From 3f7f96bf2c9bea5b556fa967c48a0f02bdd27cdd Mon Sep 17 00:00:00 2001 From: jingna <1264204245@qq.com> Date: Tue, 15 Jul 2025 09:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=BD=A2=E5=8D=A0=E6=AF=94=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/icon-group/chart-list.ts | 1 + core/core-frontend/src/locales/en.ts | 1 + core/core-frontend/src/locales/tw.ts | 1 + core/core-frontend/src/locales/zh-CN.ts | 1 + .../editor-style/components/ColorSelector.vue | 2 +- .../components/CustomColorStyleSelect.vue | 2 +- .../views/chart/components/editor/index.vue | 2 - .../chart/components/editor/util/chart.ts | 7 + .../components/js/g2plot_tooltip_carousel.ts | 3 +- .../js/panel/charts/pie/proportion.ts | 141 ++++++++++++++++++ .../components/js/panel/common/common_antv.ts | 2 +- .../components/js/panel/types/impl/g2.ts | 22 +++ .../chart/components/js/panel/types/index.ts | 1 + .../src/views/chart/components/js/util.ts | 1 + .../views/components/ChartComponentG2Plot.vue | 32 +++- .../views/chart/components/views/index.vue | 2 +- 16 files changed, 210 insertions(+), 11 deletions(-) create mode 100644 core/core-frontend/src/views/chart/components/js/panel/charts/pie/proportion.ts create mode 100644 core/core-frontend/src/views/chart/components/js/panel/types/impl/g2.ts diff --git a/core/core-frontend/src/components/icon-group/chart-list.ts b/core/core-frontend/src/components/icon-group/chart-list.ts index 63653c6..d3c1120 100644 --- a/core/core-frontend/src/components/icon-group/chart-list.ts +++ b/core/core-frontend/src/components/icon-group/chart-list.ts @@ -76,6 +76,7 @@ const iconChartMap = { 'percentage-bar-stack': percentageBarStack, 'pie-donut-rose': pieDonutRose, 'pie-donut': pieDonut, + 'pie-proportion': pieDonut, 'pie-rose': pieRose, pie: pie, 'progress-bar': progressBar, diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index 4139880..8f64bfe 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -1440,6 +1440,7 @@ export default { chart_area_stack: 'Stacked line chart', chart_pie: 'Pie chart', chart_pie_donut: 'Ring chart', + chart_pie_proportion: 'Ring proportion chart', chart_pie_rose: 'Rose chart', chart_pie_donut_rose: 'Rose ring chart', chart_funnel: 'Funnel chart', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index 07d8584..ee26a80 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -1402,6 +1402,7 @@ export default { chart_area_stack: '堆疊折線圖', chart_pie: '餅圖', chart_pie_donut: '環形圖', + chart_pie_proportion: '环形占比图', chart_pie_rose: '玫瑰圖', chart_pie_donut_rose: '玫瑰環形圖', chart_funnel: '漏斗圖', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 1df455d..7ba761e 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -1407,6 +1407,7 @@ export default { chart_area_stack: '堆叠折线图', chart_pie: '饼图', chart_pie_donut: '环形图', + chart_pie_proportion: '环形占比图', chart_pie_rose: '玫瑰图', chart_pie_donut_rose: '玫瑰环形图', chart_funnel: '漏斗图', diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/ColorSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/ColorSelector.vue index cb7ad28..951e5c3 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/ColorSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/ColorSelector.vue @@ -92,7 +92,7 @@ init()