修复BarChart在数值为0时还会绘制一小部分柱条的问题

This commit is contained in:
monitor1394
2020-06-25 21:07:17 +08:00
parent ce69581a3a
commit a3aa610d57
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.06.25) 修复`BarChart`在数值为`0`时还会绘制一小部分柱条的问题
* (2020.06.24) 修复`PieChart`在设置`clockwise`后绘制异常的问题#65
* (2020.06.23) 优化`LineChart`在峰谷差异过大时的绘制效果#64
* (2020.06.18) 修复`SerieLabel`在重新添加数据时可能不显示的问题

View File

@@ -147,7 +147,7 @@ namespace XCharts
private float CheckAnimation(Serie serie, int dataIndex, float barHig)
{
float currHig = serie.animation.CheckBarProgress(dataIndex, barHig,serie.dataCount);
float currHig = serie.animation.CheckBarProgress(dataIndex, barHig, serie.dataCount);
if (!serie.animation.IsFinish())
{
RefreshChart();
@@ -256,7 +256,7 @@ namespace XCharts
top = ClampInCoordinate(top);
}
serie.dataPoints.Add(top);
if (serie.show)
if (serie.show && currHig != 0)
{
switch (serie.barType)
{