diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index f89fac30..20a467e2 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -65,6 +65,7 @@ slug: /changelog ## master +* (2022.12.22) 修复`Covert XY Axis`后Y轴的`Label`显示异常的问题 * (2022.12.12) 修复`Axis`的`Value`轴在某些情况下计算数值范围不准确的问题 * (2022.12.12) 优化`Legend`的`formatter`支持`{h}`通配符 * (2022.12.12) 修复`Legend`的`formatter`设置为固定值时显示不正常的问题 diff --git a/Runtime/Component/Axis/AxisHelper.cs b/Runtime/Component/Axis/AxisHelper.cs index ea78584a..a5ec4df7 100644 --- a/Runtime/Component/Axis/AxisHelper.cs +++ b/Runtime/Component/Axis/AxisHelper.cs @@ -65,8 +65,9 @@ namespace XCharts.Runtime if (axis.splitNumber <= 0) { var eachWid = coordinateWid / dataCount; - if (eachWid > 80) return dataCount; - var tick = Mathf.CeilToInt(80 / eachWid); + var min = axis is YAxis ? 20 : 80; + if (eachWid > min) return dataCount; + var tick = Mathf.CeilToInt(min / eachWid); return (int) (dataCount / tick); } else