Skip to content

Commit

Permalink
修复BarChart在数值为0时还会绘制一小部分柱条的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Jun 25, 2020
1 parent ce69581 commit a3aa610
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Assets/XCharts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# 更新日志

* (2020.06.25) 修复`BarChart`在数值为`0`时还会绘制一小部分柱条的问题
* (2020.06.24) 修复`PieChart`在设置`clockwise`后绘制异常的问题#65
* (2020.06.23) 优化`LineChart`在峰谷差异过大时的绘制效果#64
* (2020.06.18) 修复`SerieLabel`在重新添加数据时可能不显示的问题
Expand Down
4 changes: 2 additions & 2 deletions Assets/XCharts/Runtime/Internal/CoordinateChart_DrawBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected void DrawYBarSerie(VertexHelper vh, Serie serie, int colorIndex, ref L

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();
Expand Down Expand Up @@ -256,7 +256,7 @@ protected void DrawXBarSerie(VertexHelper vh, Serie serie, int colorIndex, ref L
top = ClampInCoordinate(top);
}
serie.dataPoints.Add(top);
if (serie.show)
if (serie.show && currHig != 0)
{
switch (serie.barType)
{
Expand Down

0 comments on commit a3aa610

Please sign in to comment.