mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 07:21:12 +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 = 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 = () => {
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user