From 0c4fc2f5183e2291bc7435f433179ea288dbab3b Mon Sep 17 00:00:00 2001 From: wisonic Date: Tue, 27 Jan 2026 16:20:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=A5=BC=E5=9B=BE=E5=92=8C=E7=8E=AF=E5=BD=A2=E5=9B=BE=E2=80=9C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E2=80=9D=E6=95=B0=E6=8D=AE=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E8=B7=B3=E8=BD=AC=20#17771?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/locales/en.ts | 4 +++- core/core-frontend/src/locales/tw.ts | 3 ++- core/core-frontend/src/locales/zh-CN.ts | 3 ++- .../editor-style/components/BasicStyleSelector.vue | 14 +++++++++++++- .../chart/components/js/panel/charts/pie/pie.ts | 8 ++++++-- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 6c7ba0a1f2..a4088f031e 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -2132,7 +2132,9 @@ export default { enable_slider_tip: 'After enabling the slider, the carousel prompt will be disabled.', liquid_show_border: 'Show Border', liquid_border_width: 'Border Width', - liquid_border_distance: 'Border Distance' + liquid_border_distance: 'Border Distance', + top_n_label_tip: + 'Do not duplicate the data value of the sector label field, otherwise it will cause display abnormalities.' }, dataset: { field_value: 'Field Value', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index ff376b692e..3bf965cffc 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -2073,7 +2073,8 @@ export default { enable_slider_tip: '開啟縮略軸後,輪播提示將會失效', liquid_show_border: '顯示邊框', liquid_border_width: '邊框寬度', - liquid_border_distance: '邊框間距' + liquid_border_distance: '邊框間距', + top_n_label_tip: '請勿與扇區標籤欄位的數據值重複,否則會導致顯示異常。' }, dataset: { field_value: '欄位值', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index e754bbcc81..6ca61e9126 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2079,7 +2079,8 @@ export default { enable_slider_tip: '开启缩略轴后,轮播提示将会失效', liquid_show_border: '显示边框', liquid_border_width: '边框宽度', - liquid_border_distance: '边框间距' + liquid_border_distance: '边框间距', + top_n_label_tip: '请勿和扇区标签字段数据值重复,否则会导致显示异常' }, dataset: { field_value: '字段值', diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue index 0ec14dd830..36990d7039 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue @@ -1440,7 +1440,6 @@ onMounted(async () => { { :maxlength="50" @change="changeBasicStyle('topNLabel')" /> +
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 fa682344b8..80ba364db8 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 @@ -133,7 +133,10 @@ export class Pie extends G2PlotChartView { const { Pie: G2Pie } = await import('@antv/g2plot/esm/plots/pie') const newChart = new G2Pie(container, options) newChart.on('interval:click', d => { - d.data?.data?.field !== customAttr.basicStyle.topNLabel && action(d) + if (customAttr.basicStyle.calcTopN && d.data?.data?.others) { + return + } + action(d) }) configPlotTooltipEvent(chart, newChart) return newChart @@ -279,7 +282,8 @@ export class Pie extends G2PlotChartView { dynamicTooltipValue: [], field: basicStyle.topNLabel, name: basicStyle.topNLabel, - value: 0 + value: 0, + others: true } const dynamicTotalMap: Record = {} otherItems.reduce((p, n) => {