From 5330197a11ea70ae713c694f7e2588aa720ff1bf Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Thu, 4 Jun 2026 10:33:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=81=87=E5=88=B0?= =?UTF-8?q?=E7=A7=91=E5=AD=A6=E8=AE=A1=E6=95=B0=E6=B3=95=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E6=97=A0=E6=B3=95=E5=AE=8C=E6=88=90=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E6=98=BE=E7=A4=BA=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/chart/components/js/formatter.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/formatter.ts b/core/core-frontend/src/views/chart/components/js/formatter.ts index 729407f5e0..a6ec55349d 100644 --- a/core/core-frontend/src/views/chart/components/js/formatter.ts +++ b/core/core-frontend/src/views/chart/components/js/formatter.ts @@ -110,6 +110,10 @@ function retain(value, n) { if (!n) return Math.round(value) const tran = Math.round(value * Math.pow(10, n)) / Math.pow(10, n) let tranV = tran.toString() + // 遇到科学计数法时用 toFixed(n) 转成普通小数字符串 + if (/e/i.test(tranV)) { + tranV = tran.toFixed(n) + } const newVal = tranV.indexOf('.') if (newVal < 0) { tranV += '.'