[bug][axis] fix axis tick error (#209)

This commit is contained in:
monitor1394
2022-07-04 13:14:23 +08:00
parent 419715bb2a
commit 2248b61d03
2 changed files with 5 additions and 4 deletions

View File

@@ -56,6 +56,7 @@
## master
* (2022.07.04) 修复`Axis`在设置`offset``Tick`绘制位置异常的问题 (#209)
* (2022.07.03) 优化`AxisLabel``formatterFunction`自定义委托
* (2022.07.03) 增加`AxisName``onZero`参数支持设置坐标轴名称位置是否和Y轴0刻度一致 (#207)
* (2022.07.02) 修复`PieChart`用代码动态创建时`Legend`不正常的问题 (#206)

View File

@@ -612,12 +612,12 @@ namespace XCharts
if ((axis.axisTick.inside && axis.IsBottom()) ||
(!axis.axisTick.inside && axis.IsTop()))
{
sY = startY + axis.offset + lineWidth;
sY = startY + lineWidth;
eY = sY + tickLength;
}
else
{
sY = startY + axis.offset - lineWidth;
sY = startY - lineWidth;
eY = sY - tickLength;
}
@@ -639,12 +639,12 @@ namespace XCharts
if ((axis.axisTick.inside && axis.IsLeft()) ||
(!axis.axisTick.inside && axis.IsRight()))
{
sX = startX + axis.offset + lineWidth;
sX = startX + lineWidth;
eX = sX + tickLength;
}
else
{
sX = startX + axis.offset - lineWidth;
sX = startX - lineWidth;
eX = sX - tickLength;
}