From 9cb3911dafaeb39cbb51a7734bb71e1e4b7cd98c Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Mon, 25 Nov 2024 14:54:27 +0800 Subject: [PATCH] =?UTF-8?q?style(=E5=9B=BE=E8=A1=A8):=20=E5=88=BB=E5=BA=A6?= =?UTF-8?q?=E5=80=BC=E7=9A=84=E6=95=B0=E5=80=BC=E6=A0=BC=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E4=B8=8E=E6=8C=87=E6=A0=87=E7=9A=84=E6=95=B0=E5=80=BC=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=20#12339?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/js/panel/charts/others/gauge.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/gauge.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/gauge.ts index ec6f35f207..d3a8b1e002 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/gauge.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/gauge.ts @@ -276,7 +276,10 @@ export class Gauge extends G2PlotChartView { return '' } if (gaugePercentLabel === false) { - return v === '0' ? min : v === '1' ? max : min + (max - min) * v + const resultV = v === '0' ? min : v === '1' ? max : min + (max - min) * v + return labelFormatter.type === 'value' + ? valueFormatter(resultV, labelFormatter) + : resultV } return v === '0' ? v : v * 100 + '%' }