mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-22 11:46:36 +08:00
fix: 修复ECharts环形图文字重叠的问题 (#682)
* fix: 修复ECharts环形图文字重叠的问题 * chore: remove 注释
This commit is contained in:
parent
ce97b04d79
commit
944f03a064
|
@ -97,6 +97,25 @@ const renderCountChart = () => {
|
|||
}
|
||||
countChart = echarts.init(countContainer);
|
||||
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 = () => {
|
||||
|
|
|
@ -367,8 +367,7 @@ export function getPieChartDataSet({
|
|||
emphasis: {
|
||||
scale: true,
|
||||
label: {
|
||||
show: true,
|
||||
formatter: ['{value|{d}%}', '{name|{b}渠道占比}'].join('\n'),
|
||||
show: false,
|
||||
rich: {
|
||||
value: {
|
||||
color: textColor,
|
||||
|
|
Loading…
Reference in New Issue
Block a user