From 08fe710b8c72514c1b2c767f354f6c1eba48f12f Mon Sep 17 00:00:00 2001 From: ulleo Date: Tue, 8 Jul 2025 18:46:26 +0800 Subject: [PATCH] feat: pie chat to display labels & tooltip with percent value --- frontend/src/views/chat/component/charts/Pie.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/chat/component/charts/Pie.ts b/frontend/src/views/chat/component/charts/Pie.ts index 7d314d3c..39c4769b 100644 --- a/frontend/src/views/chat/component/charts/Pie.ts +++ b/frontend/src/views/chat/component/charts/Pie.ts @@ -57,7 +57,7 @@ export class Pie extends BaseG2Chart { }, ], tooltip: (data) => { - return { name: y[0].name, value: data[y[0].value] } + return { name: y[0].name, value: `${data[y[0].value]}${isPercent ? '%' : ''}` } }, }