File tree 2 files changed +21
-2
lines changed
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,25 @@ const renderCountChart = () => {
97
97
}
98
98
countChart = echarts .init (countContainer );
99
99
countChart .setOption (getPieChartDataSet (chartColors .value ));
100
+
101
+ // 取消之前高亮的图形
102
+ countChart .dispatchAction ({
103
+ type: ' downplay' ,
104
+ seriesIndex: 0 ,
105
+ dataIndex: - 1 ,
106
+ });
107
+ // 高亮当前图形
108
+ countChart .dispatchAction ({
109
+ type: ' highlight' ,
110
+ seriesIndex: 0 ,
111
+ dataIndex: 1 ,
112
+ });
113
+ // 显示 tooltip
114
+ countChart .dispatchAction ({
115
+ type: ' showTip' ,
116
+ seriesIndex: 0 ,
117
+ dataIndex: 1 ,
118
+ });
100
119
};
101
120
102
121
const renderCharts = () => {
Original file line number Diff line number Diff line change @@ -367,8 +367,8 @@ export function getPieChartDataSet({
367
367
emphasis : {
368
368
scale : true ,
369
369
label : {
370
- show : true ,
371
- formatter : [ '{value|{d}%}' , '{name|{b}渠道占比}' ] . join ( '\n' ) ,
370
+ show : false ,
371
+ // formatter: ['{value|{d}%}', '{name|{b}渠道占比}'].join('\n'), 就是这个东西造成文字重叠
372
372
rich : {
373
373
value : {
374
374
color : textColor ,
You can’t perform that action at this time.
0 commit comments