修复LegendLabelStyleformatter不生效的问题

This commit is contained in:
monitor1394
2023-12-19 22:02:05 +08:00
parent 3d73578063
commit 06ef86a9d6
2 changed files with 2 additions and 1 deletions

View File

@@ -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`

View File

@@ -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
{