From dac9cdf9d15e722a6e30130770442be8ea35ef78 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Thu, 18 Sep 2025 18:52:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AD=90=E5=BC=B9=E5=9B=BE=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A2=9C=E8=89=B2=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=BD=93=E5=AE=9E=E9=99=85=E5=80=BC?= =?UTF-8?q?=E4=B8=8E=E7=9B=AE=E6=A0=87=E5=80=BC=E4=BD=BF=E7=94=A8=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=8C=87=E6=A0=87=E6=97=B6=EF=BC=8C=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E5=80=BC=E9=A2=9C=E8=89=B2=E5=8F=98=E6=88=90=E9=BB=91?= =?UTF-8?q?=E8=89=B2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/js/panel/charts/g2/bar/bullet-graph.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bullet-graph.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bullet-graph.ts index d58710d143..348784290b 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bullet-graph.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/g2/bar/bullet-graph.ts @@ -235,8 +235,11 @@ export class BulletGraph extends G2ChartView { } : false } - const targetName = + let targetName = chart.yAxisExt[0]?.chartShowName || bullet.bar.target.name || chart.yAxisExt[0]?.name + if (targetName === measureName) { + targetName = `${targetName} ` + } const target = { type: 'point', encode: { @@ -399,7 +402,7 @@ export class BulletGraph extends G2ChartView { // exceedAdjust 自动对标签做溢出检测和矫正,即当标签超出视图区域时,会对标签自动做反方向的位移 // overlapHide 对位置碰撞的标签进行隐藏,默认保留前一个,隐藏后一个 const transform = { - transform: [{ type: 'contrastReverse' }, { type: 'exceedAdjust' }, { type: 'overlapHide' }] + transform: [{ type: 'exceedAdjust' }, { type: 'overlapHide' }] } // 配置标签样式 const label = {