修复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

@@ -72,6 +72,7 @@ slug: /changelog
## master
* (2024.03.11) 修复`Legend``formatter`在设置`{d}`通配符时显示可能不匹配的问题
* (2024.03.08) 修复`Tooltip``title`从旧版本升级后可能不显示的问题
## v3.10.1

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)