From 5463821a7f9a9d31a1d4cd553e75652ed7fc8c54 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 05 六月 2021 13:28:25 +0800 Subject: [PATCH] 2021-06-05 --- src/menu/components/chart/antv-pie/index.jsx | 28 +++++++++++++++++++++------- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx index 8c6428b..9af66e2 100644 --- a/src/menu/components/chart/antv-pie/index.jsx +++ b/src/menu/components/chart/antv-pie/index.jsx @@ -264,10 +264,16 @@ innerRadius: innerRadius, radius: innerRadius + (radius - innerRadius) / 2, }) - chart.tooltip({ - showTitle: false, - showMarkers: false, - }) + + if (plot.tooltip !== 'true') { + chart.tooltip(false) + } else { + chart.tooltip({ + showTitle: false, + showMarkers: false + }) + } + chart.legend(false) let chart1 = chart .interval() @@ -387,7 +393,11 @@ } } - chart.interaction('element-highlight') + if (plot.interaction && plot.interaction.length) { + plot.interaction.forEach(t => { + chart.interaction(t) + }) + } chart.render() } @@ -550,10 +560,8 @@ }) } } - chart.interaction('element-active') } else { chart.axis(false) - chart.interaction('element-highlight') let _chart = chart .interval() .position(`${X_axis}*${Y_axis}`) @@ -577,6 +585,12 @@ } } + if (plot.interaction && plot.interaction.length) { + plot.interaction.forEach(t => { + chart.interaction(t) + }) + } + chart.render() } -- Gitblit v1.8.0