[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

@@ -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;
}