mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-26 02:40:13 +00:00
修复Legend的formatter在设置{d}通配符时显示可能不匹配的问题
This commit is contained in:
@@ -72,6 +72,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2024.03.11) 修复`Legend`的`formatter`在设置`{d}`通配符时显示可能不匹配的问题
|
||||||
* (2024.03.08) 修复`Tooltip`的`title`从旧版本升级后可能不显示的问题
|
* (2024.03.08) 修复`Tooltip`的`title`从旧版本升级后可能不显示的问题
|
||||||
|
|
||||||
## v3.10.1
|
## v3.10.1
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ namespace XCharts.Runtime
|
|||||||
if (isPercent)
|
if (isPercent)
|
||||||
{
|
{
|
||||||
var total = serie.GetDataTotal(dimensionIndex, serie.GetSerieData(bIndex));
|
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));
|
content = content.Replace(old, ChartCached.FloatToStr(percent, numericFormatter));
|
||||||
}
|
}
|
||||||
else if (isTotal)
|
else if (isTotal)
|
||||||
|
|||||||
Reference in New Issue
Block a user