From 3ec5577c022eecf798f43cd3b3006b0d32fc7ce8 Mon Sep 17 00:00:00 2001 From: wisonic Date: Fri, 3 Jan 2025 16:10:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=9B=B7=E8=BE=BE=E5=9B=BE=E5=BC=80=E5=90=AF=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=97=A0=E6=B3=95=E8=A7=A6=E5=8F=91=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E6=88=96=E8=B7=B3=E8=BD=AC=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/others/radar.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts index 4469a17737..8ecc71a2d3 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts @@ -119,6 +119,17 @@ export class Radar extends G2PlotChartView { const { Radar: G2Radar } = await import('@antv/g2plot/esm/plots/radar') const newChart = new G2Radar(container, options) newChart.on('point:click', action) + if (options.label) { + newChart.on('label:click', e => { + action({ + x: e.x, + y: e.y, + data: { + data: e.target.attrs.data + } + }) + }) + } configPlotTooltipEvent(chart, newChart) return newChart } @@ -175,6 +186,7 @@ export class Radar extends G2PlotChartView { group.addShape({ type: 'text', attrs: { + data, x: 0, y: 0, text: value,