增加{y}通配符用于获取Y轴的类目名

This commit is contained in:
monitor1394
2024-01-23 22:56:03 +08:00
parent 9e39150009
commit 61a2da10ba
9 changed files with 74 additions and 21 deletions

View File

@@ -503,7 +503,7 @@ namespace XCharts.Runtime
var content = string.IsNullOrEmpty(currLabel.formatter) ?
ChartCached.NumberToStr(value, currLabel.numericFormatter) :
SerieLabelHelper.GetFormatterContent(serie, serieData, value, total,
currLabel, color);
currLabel, color, chart);
var offset = GetSerieDataLabelOffset(serieData, currLabel);
labelObject.SetActive(currLabel.show && !isIgnore && !serie.IsMinShowLabelValue(value));
labelObject.SetText(content);
@@ -525,7 +525,7 @@ namespace XCharts.Runtime
var content = string.IsNullOrEmpty(currLabel.formatter) ?
ChartCached.NumberToStr(value, currLabel.numericFormatter) :
SerieLabelHelper.GetFormatterContent(serie, serieData, value, total,
currLabel, color);
currLabel, color, chart);
serieData.SetLabelActive(currLabel.show && !isIgnore && !serie.IsMinShowLabelValue(value));
serieData.labelObject.UpdateIcon(currLabel.icon);
serieData.labelObject.SetText(content);