mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 02:10:16 +00:00
Fixed {d} formatter error when value is 0
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
## branch-2.0
|
## branch-2.0
|
||||||
|
|
||||||
|
* (2022.02.08) Fixed {d} formatter error when value is 0
|
||||||
* (2022.02.08) Fixed `YAxis` `AxisLabel`'s `onZero` does not work
|
* (2022.02.08) Fixed `YAxis` `AxisLabel`'s `onZero` does not work
|
||||||
* (2022.01.06) Improved `Zebra` bar chart
|
* (2022.01.06) Improved `Zebra` bar chart
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
## branch-2.0
|
## branch-2.0
|
||||||
|
|
||||||
|
* (2022.02.08) 修复数据全0时`{d}`显示不正确的问题
|
||||||
* (2022.02.08) 修复`YAxis`的`AxisLabel`的`onZero`参数不生效的问题
|
* (2022.02.08) 修复`YAxis`的`AxisLabel`的`onZero`参数不生效的问题
|
||||||
* (2022.01.06) 优化`Zebra`斑马柱图
|
* (2022.01.06) 优化`Zebra`斑马柱图
|
||||||
|
|
||||||
|
|||||||
@@ -248,6 +248,8 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
if (total != 0)
|
if (total != 0)
|
||||||
content = content.Replace(old, ChartCached.FloatToStr(value / total * 100, numericFormatter));
|
content = content.Replace(old, ChartCached.FloatToStr(value / total * 100, numericFormatter));
|
||||||
|
else
|
||||||
|
content = content.Replace(old, ChartCached.FloatToStr(0, numericFormatter));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user