From bba9610a36395973a1fd3c7405ab68d0e4faabaf Mon Sep 17 00:00:00 2001 From: ulleo Date: Thu, 19 Jun 2025 10:32:20 +0800 Subject: [PATCH] feat: chart label --- frontend/src/views/chat/component/charts/Bar.ts | 3 +-- frontend/src/views/chat/component/charts/Column.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/chat/component/charts/Bar.ts b/frontend/src/views/chat/component/charts/Bar.ts index b43f8271..731faaf1 100644 --- a/frontend/src/views/chat/component/charts/Bar.ts +++ b/frontend/src/views/chat/component/charts/Bar.ts @@ -43,8 +43,7 @@ export class Bar extends BaseG2Chart { }) .label({ text: y[0].value, - position: 'inside', - transform: [{ type: 'overlapDodgeY' }], + transform: [{ type: 'overlapDodgeY' }, { type: 'exceedAdjust' }, { type: 'overlapHide' }], }) if (series.length > 0) { diff --git a/frontend/src/views/chat/component/charts/Column.ts b/frontend/src/views/chat/component/charts/Column.ts index c014e0f9..690ec169 100644 --- a/frontend/src/views/chat/component/charts/Column.ts +++ b/frontend/src/views/chat/component/charts/Column.ts @@ -42,8 +42,7 @@ export class Column extends BaseG2Chart { }) .label({ text: y[0].value, - position: 'inside', - transform: [{ type: 'overlapDodgeY' }], + transform: [{ type: 'overlapDodgeY' }, { type: 'exceedAdjust' }, { type: 'overlapHide' }], }) if (series.length > 0) {