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/tabviews/custom/components/chart/antv-scatter/index.jsx | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx index ea53270..f172d5a 100644 --- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx +++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx @@ -348,13 +348,18 @@ itemName: { style: { fill: plot.color } } }) - chart.tooltip({ - showTitle: false, - showCrosshairs: true, - crosshairs: { - type: 'xy', - } - }) + if (plot.tooltip !== 'true') { + chart.tooltip(false) + } else { + chart.tooltip({ + showTitle: false, + showCrosshairs: true, + crosshairs: { + type: 'xy', + } + }) + } + chart .point() .position(`${plot.Xaxis}*${plot.Yaxis}`) @@ -369,7 +374,11 @@ .style({ fillOpacity: 0.85 }) - chart.interaction('legend-highlight'); + if (plot.interaction && plot.interaction.length) { + plot.interaction.forEach(t => { + chart.interaction(t) + }) + } chart.render() } -- Gitblit v1.8.0