[bug][ring] fix ring label formatter (#195)

This commit is contained in:
monitor1394
2022-05-01 10:54:14 +08:00
parent 4e4d0bc85d
commit 43c31405b8
5 changed files with 16 additions and 6 deletions

View File

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