diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index abefd9f4..3bc725bf 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -70,6 +70,7 @@ slug: /changelog ## master +* (2023.12.19) 修复`Legend`的`LabelStyle`的`formatter`不生效的问题 * (2023.12.12) 增加`Legend`的`TextLimit`可限制图例显示文本的长度 * (2023.12.11) 修复`Serie`添加`double.MaxValue`时坐标绘制失败的问题 * (2023.12.10) 增加`Serie`的`minShowLabel`可隐藏小于指定值的`label` diff --git a/Runtime/Component/Legend/LegendHandler.cs b/Runtime/Component/Legend/LegendHandler.cs index b40cac5f..f42ec6e9 100644 --- a/Runtime/Component/Legend/LegendHandler.cs +++ b/Runtime/Component/Legend/LegendHandler.cs @@ -161,7 +161,7 @@ namespace XCharts.Runtime private string GetFormatterContent(Legend legend, int dataIndex, string category) { #pragma warning disable 0618 - if (string.IsNullOrEmpty(legend.formatter) || string.IsNullOrEmpty(legend.labelStyle.formatter)) + if (string.IsNullOrEmpty(legend.formatter) && string.IsNullOrEmpty(legend.labelStyle.formatter)) return category; else {