优化PieChart在数据全为0时的显示为等份的效果

This commit is contained in:
monitor1394
2020-06-07 07:16:24 +08:00
parent a2e1cd9840
commit 53e988e8d2
8 changed files with 248 additions and 180 deletions

View File

@@ -1326,6 +1326,17 @@ namespace XCharts
}
}
public float GetDataTotal(int dimension)
{
float total = 0;
foreach (var sdata in data)
{
if (sdata.show)
total += sdata.GetData(dimension);
}
return total;
}
/// <summary>
/// 获得系列的数据列表
/// </summary>