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) => {