From 0331804a85cc3a6c1cd5c9215a42cb5ab6b83ace Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Wed, 23 Aug 2023 22:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`YAxis`=E7=9A=84`Label`?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=BC=9A=E9=87=8D=E5=A4=8D=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 --- Runtime/Component/Label/LabelStyle.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Component/Label/LabelStyle.cs b/Runtime/Component/Label/LabelStyle.cs index 1ada7004..00920dda 100644 --- a/Runtime/Component/Label/LabelStyle.cs +++ b/Runtime/Component/Label/LabelStyle.cs @@ -355,11 +355,11 @@ namespace XCharts.Runtime { if (Math.Abs(maxValue) >= Math.Abs(minValue)) { - newNumericFormatter = MathUtil.IsInteger(maxValue) ? "f0" : "f" + MathUtil.GetPrecision(maxValue); + newNumericFormatter = MathUtil.IsInteger(maxValue) ? "0.#" : "f" + MathUtil.GetPrecision(maxValue); } else { - newNumericFormatter = MathUtil.IsInteger(minValue) ? "f0" : "f" + MathUtil.GetPrecision(minValue); + newNumericFormatter = MathUtil.IsInteger(minValue) ? "0.#" : "f" + MathUtil.GetPrecision(minValue); } } if (string.IsNullOrEmpty(m_Formatter))