From a8abd2aad44d13ac00258203ff2abc413043600a Mon Sep 17 00:00:00 2001 From: ulleo Date: Wed, 24 Jun 2026 17:44:20 +0800 Subject: [PATCH] feat: add thousands separator settings --- .../svg/chart/icon-thousand-separator.svg | 6 ++ frontend/src/i18n/en.json | 2 + frontend/src/i18n/ko-KR.json | 2 + frontend/src/i18n/zh-CN.json | 2 + frontend/src/i18n/zh-TW.json | 2 + .../src/views/chat/answer/ChartAnswer.vue | 3 + .../src/views/chat/answer/PredictAnswer.vue | 3 + .../src/views/chat/chat-block/ChartBlock.vue | 84 +++++++++++++++---- .../src/views/chat/component/BaseChart.ts | 5 +- .../views/chat/component/ChartComponent.vue | 36 ++++++-- .../chat/component/DisplayChartBlock.vue | 27 ++++-- .../src/views/chat/component/charts/Bar.ts | 20 +++-- .../src/views/chat/component/charts/Column.ts | 20 +++-- .../src/views/chat/component/charts/Line.ts | 20 +++-- .../src/views/chat/component/charts/Pie.ts | 23 +++-- .../src/views/chat/component/charts/Table.ts | 13 +-- 16 files changed, 206 insertions(+), 62 deletions(-) create mode 100644 frontend/src/assets/svg/chart/icon-thousand-separator.svg diff --git a/frontend/src/assets/svg/chart/icon-thousand-separator.svg b/frontend/src/assets/svg/chart/icon-thousand-separator.svg new file mode 100644 index 000000000..670e86901 --- /dev/null +++ b/frontend/src/assets/svg/chart/icon-thousand-separator.svg @@ -0,0 +1,6 @@ + + + diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index f87d3a582..fac7d5d35 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -788,6 +788,8 @@ "no_data": "No Data", "loading_data": "Loading ...", "show_error_detail": "Show error info", + "thousands_separator_setting": "Thousands Separator Setting", + "thousands_separator_display": "Apply Thousands Separator Display", "log": { "GENERATE_SQL": "Generate SQL", "GENERATE_CHART": "Generate Chart Structure", diff --git a/frontend/src/i18n/ko-KR.json b/frontend/src/i18n/ko-KR.json index e5027582c..ca8c0816a 100644 --- a/frontend/src/i18n/ko-KR.json +++ b/frontend/src/i18n/ko-KR.json @@ -788,6 +788,8 @@ "no_data": "데이터가 없습니다", "loading_data": "로딩 중 ...", "show_error_detail": "구체적인 정보 보기", + "thousands_separator_setting": "천 단위 구분 기호 설정", + "thousands_separator_display": "천 단위 구분 기호 표시 적용", "log": { "GENERATE_SQL": "SQL 생성", "GENERATE_CHART": "차트 구조 생성", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 12c2f05f0..09d4546a2 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -788,6 +788,8 @@ "no_data": "暂无数据", "loading_data": "加载中...", "show_error_detail": "查看具体信息", + "thousands_separator_setting": "千分位符设置", + "thousands_separator_display": "应用千分位符展示", "log": { "GENERATE_SQL": "生成 SQL", "GENERATE_CHART": "生成图表结构", diff --git a/frontend/src/i18n/zh-TW.json b/frontend/src/i18n/zh-TW.json index 2eda931a3..d6261e283 100644 --- a/frontend/src/i18n/zh-TW.json +++ b/frontend/src/i18n/zh-TW.json @@ -788,6 +788,8 @@ "no_data": "暫無資料", "loading_data": "載入中...", "show_error_detail": "檢視具體資訊", + "thousands_separator_setting": "千分位符設定", + "thousands_separator_display": "套用千分位符顯示", "log": { "GENERATE_SQL": "產生 SQL", "GENERATE_CHART": "產生圖表結構", diff --git a/frontend/src/views/chat/answer/ChartAnswer.vue b/frontend/src/views/chat/answer/ChartAnswer.vue index 5bec0b639..32c9fdd5e 100644 --- a/frontend/src/views/chat/answer/ChartAnswer.vue +++ b/frontend/src/views/chat/answer/ChartAnswer.vue @@ -258,6 +258,8 @@ function stop() { emits('stop') } +const enableThousandsSeparatorList = ref>([]) + onBeforeUnmount(() => { stop() }) @@ -274,6 +276,7 @@ defineExpose({ sendMessage, index: () => index.value, stop })