修复Legendformatter在设置{d}通配符时显示可能不匹配的问题

This commit is contained in:
monitor1394
2024-03-11 07:00:31 +08:00
parent ead9034870
commit 0fb1cab302
2 changed files with 2 additions and 1 deletions

View File

@@ -189,7 +189,7 @@ namespace XCharts.Runtime
if (isPercent)
{
var total = serie.GetDataTotal(dimensionIndex, serie.GetSerieData(bIndex));
var percent = total == 0 ? 0 : value / serie.yTotal * 100;
var percent = total == 0 ? 0 : value / total * 100;
content = content.Replace(old, ChartCached.FloatToStr(percent, numericFormatter));
}
else if (isTotal)