[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

@@ -59,6 +59,7 @@
## master
* (2022.10.15) 修复`Axis``Label``DataZoom`开启时可能显示不正常的问题 (#227)
* (2022.10.14) 增加`DataZoom`对数值轴的支持
* (2022.10.13) 修复`Pie`的环形饼图设置边框时效果异常的问题 (#225)
* (2022.10.13) 修复`Download`的接口造成`iOS`平台打包失败的问题
@@ -66,7 +67,7 @@
* (2022.10.10) 调整文档格式
* (2022.10.10) 增加`Line``SmoothLimit`可控制平滑曲线不同效果
* (2022.10.05) 修复`Serie`隐藏时`Tooltip`还显示信息的问题
* (2022.09.30) 修复`Chart`在很小尺寸时出现`DivideByZeroException`异常
* (2022.09.30) 修复`Chart`在很小尺寸时出现`DivideByZeroException`异常的问题
## v3.3.0

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);