[fix] fix axis label error when datazoom enable (#227)

This commit is contained in:
monitor1394
2022-10-15 23:00:20 +08:00
parent a9fefae642
commit a78eed9c5c
2 changed files with 4 additions and 1 deletions

View File

@@ -368,6 +368,8 @@ namespace XCharts
((inside && axis.IsLeft()) || (!inside && axis.IsRight()) ?
TextAnchor.MiddleLeft :
TextAnchor.MiddleRight);
if (axis.IsCategory() && axis.boundaryGap)
splitNumber -= 1;
for (int i = 0; i < splitNumber; i++)
{
var labelWidth = AxisHelper.GetScaleWidth(axis, axisLength, i + 1, dataZoom);