From b959b71b21c15726e18ab5258b7e23df7bf34e9f Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 9 Apr 2025 10:09:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=8E=AF=E5=BD=A2=E5=9B=BE&=E9=A5=BC=E5=9B=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=90=88=E5=B9=B6=E5=90=8E=E7=82=B9=E5=87=BB=E5=85=B6?= =?UTF-8?q?=E5=AE=83=E4=BB=8D=E5=8F=AF=E8=A7=A6=E5=8F=91=E4=B8=8B=E9=92=BB?= =?UTF-8?q?&=E8=81=94=E5=8A=A8&=E8=B7=B3=E8=BD=AC=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/js/panel/charts/pie/pie.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/pie.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/pie.ts index f6f320ed87..fa682344b8 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/pie.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/pie.ts @@ -27,7 +27,6 @@ import type { Datum } from '@antv/g2plot/esm/types/common' import { add } from 'mathjs' import isEmpty from 'lodash-es/isEmpty' import { cloneDeep } from 'lodash-es' -import { Chart } from '@antv/g2' import { useI18n } from '@/hooks/web/useI18n' const { t } = useI18n() const DEFAULT_DATA = [] @@ -133,7 +132,9 @@ export class Pie extends G2PlotChartView { const options = this.setupOptions(chart, initOptions) const { Pie: G2Pie } = await import('@antv/g2plot/esm/plots/pie') const newChart = new G2Pie(container, options) - newChart.on('interval:click', action) + newChart.on('interval:click', d => { + d.data?.data?.field !== customAttr.basicStyle.topNLabel && action(d) + }) configPlotTooltipEvent(chart, newChart) return newChart }