增加Tooltipformatter{.}{c:0}{c1:1}的支持

This commit is contained in:
monitor1394
2020-04-23 13:07:49 +08:00
parent cc5c5d3078
commit 9e3e569396
9 changed files with 343 additions and 61 deletions

View File

@@ -1163,7 +1163,12 @@ namespace XCharts
var serieData = GetDataList(dataZoom);
if (index < serieData.Count)
{
return serieData[index].data[1];
var value = serieData[index].data[1];
if (showAsPositiveNumber)
{
value = Mathf.Abs(value);
}
return value;
}
return 0;
}
@@ -1174,7 +1179,12 @@ namespace XCharts
var serieData = GetDataList(dataZoom);
if (index < serieData.Count)
{
return serieData[index].GetCurrData(1, animation.GetUpdateAnimationDuration());
var value = serieData[index].GetCurrData(1, animation.GetUpdateAnimationDuration());
if (showAsPositiveNumber)
{
value = Mathf.Abs(value);
}
return value;
}
return 0;
}
@@ -1195,6 +1205,10 @@ namespace XCharts
if (index < serieData.Count)
{
yData = serieData[index].data[1];
if (showAsPositiveNumber)
{
yData = Mathf.Abs(yData);
}
dataName = serieData[index].name;
}
}