fix: 修复ECharts环形图文字重叠的问题 (#682)

* fix: 修复ECharts环形图文字重叠的问题

* chore: remove 注释
This commit is contained in:
悠静萝莉 2024-02-15 22:40:28 +08:00 committed by GitHub
parent ce97b04d79
commit 944f03a064
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 2 deletions

View File

@ -97,6 +97,25 @@ const renderCountChart = () => {
} }
countChart = echarts.init(countContainer); countChart = echarts.init(countContainer);
countChart.setOption(getPieChartDataSet(chartColors.value)); countChart.setOption(getPieChartDataSet(chartColors.value));
//
countChart.dispatchAction({
type: 'downplay',
seriesIndex: 0,
dataIndex: -1,
});
//
countChart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: 1,
});
// tooltip
countChart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: 1,
});
}; };
const renderCharts = () => { const renderCharts = () => {

View File

@ -367,8 +367,7 @@ export function getPieChartDataSet({
emphasis: { emphasis: {
scale: true, scale: true,
label: { label: {
show: true, show: false,
formatter: ['{value|{d}%}', '{name|{b}渠道占比}'].join('\n'),
rich: { rich: {
value: { value: {
color: textColor, color: textColor,