From 00274567cf9ed3c56e75b12d25d5ef7a97404fdc Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Mon, 12 Jun 2023 08:05:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`AxisLabel`=E7=9A=84`formatte?= =?UTF-8?q?rFunction`=E5=9C=A8=E6=95=B0=E5=80=BC=E8=BD=B4=E6=97=B6`value`?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 2 ++ Runtime/Component/Label/LabelStyle.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 06875db3..b8b3b7d1 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -66,6 +66,8 @@ slug: /changelog ## master +* (2023.06.12) 修复`AxisLabel`的`formatterFunction`在数值轴时`value`不对的问题 + ## v3.7.0 版本要点: diff --git a/Runtime/Component/Label/LabelStyle.cs b/Runtime/Component/Label/LabelStyle.cs index a97e5ae4..69698c07 100644 --- a/Runtime/Component/Label/LabelStyle.cs +++ b/Runtime/Component/Label/LabelStyle.cs @@ -413,7 +413,7 @@ namespace XCharts.Runtime protected string GetFormatterFunctionContent(int labelIndex, double value, string currentContent) { return m_FormatterFunction == null ? currentContent : - m_FormatterFunction(labelIndex, labelIndex, null, currentContent); + m_FormatterFunction(labelIndex, value, null, currentContent); } } } \ No newline at end of file