增加AxisLabel和SerieLabel的formatter委托方法 #145

This commit is contained in:
monitor1394
2021-06-27 12:26:20 +08:00
parent 78923ede3a
commit e7be2adbc9
9 changed files with 86 additions and 16 deletions

View File

@@ -98,6 +98,10 @@ namespace XCharts
var numericFormatter = serieLabel == null ? serie.label.numericFormatter : serieLabel.numericFormatter;
var serieName = serie.name;
var dataName = serieData != null ? serieData.name : null;
if (serieLabel.formatterFunction != null)
{
return serieLabel.formatterFunction(serieData.index, dataValue);
}
if (string.IsNullOrEmpty(serieLabel.formatter))
return ChartCached.NumberToStr(dataValue, numericFormatter);
else