Skip to content

Commit

Permalink
Fixed axis split line bug #181
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Feb 17, 2022
1 parent 41a9606 commit 0e25a23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Assets/XCharts/CHANGELOG-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

## branch-2.0

* (2022.02.17) Fixed bug where axis split line might be displayed outside the coordinate system #181
* (2022.02.08) Fixed {d} formatter error when value is 0
* (2022.02.08) Fixed `YAxis` `AxisLabel`'s `onZero` does not work
* (2022.01.06) Improved `Zebra` bar chart
Expand Down
1 change: 1 addition & 0 deletions Assets/XCharts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

## branch-2.0

* (2022.02.17) 修复`Axis``SplitLine`可能会显示在坐标系外的问题 #181
* (2022.02.08) 修复数据全0时`{d}`显示不正确的问题
* (2022.02.08) 修复`YAxis``AxisLabel``onZero`参数不生效的问题
* (2022.01.06) 优化`Zebra`斑马柱图
Expand Down
4 changes: 2 additions & 2 deletions Assets/XCharts/Runtime/Internal/CoordinateChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ private void DrawYAxisSplit(VertexHelper vh, int yAxisIndex, YAxis yAxis)
new Vector2(grid.runtimeX, pY + scaleWidth),
yAxis.splitArea.GetColor(i, m_Theme.axis));
}
if (yAxis.splitLine.show)
if (yAxis.splitLine.show && pY >= grid.runtimeY)
{
if (!xAxis.axisLine.show || !xAxis.axisLine.onZero || zeroPos.y != pY)
{
Expand Down Expand Up @@ -1200,7 +1200,7 @@ private void DrawXAxisSplit(VertexHelper vh, int xAxisIndex, XAxis xAxis)
new Vector2(pX + scaleWidth, grid.runtimeY),
xAxis.splitArea.GetColor(i, m_Theme.axis));
}
if (xAxis.splitLine.show)
if (xAxis.splitLine.show && pX >= grid.runtimeX)
{
if (!yAxis.axisLine.show || !yAxis.axisLine.onZero || zeroPos.x != pX)
{
Expand Down

0 comments on commit 0e25a23

Please sign in to comment.