From 3d09d82abda858fb4cd8851b875003495f56ef2e Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Thu, 2 Feb 2023 08:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`DataZoom`=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E6=97=B6`X=E8=BD=B4`=E7=9A=84`Label`=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E4=BC=9A=E6=98=BE=E7=A4=BA=E5=9C=A8=E5=9B=BE=E8=A1=A8=E5=A4=96?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 1 + Runtime/Component/Axis/AxisHelper.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 36107da5..b1271a48 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -65,6 +65,7 @@ slug: /changelog ## master +* (2023.02.02) 修复`DataZoom`开启时`X轴`的`Label`可能会显示在图表外的问题 * (2023.02.02) 优化`SerieData`的`ignore`设置时的忽略数据判断 * (2023.02.01) 修复`XChartsMgr.ContainsChart()`接口异常 * (2023.01.31) 增加`InputSystem`的支持 (#242) (by Bian-Sh) diff --git a/Runtime/Component/Axis/AxisHelper.cs b/Runtime/Component/Axis/AxisHelper.cs index a5ec4df7..d6ba3043 100644 --- a/Runtime/Component/Axis/AxisHelper.cs +++ b/Runtime/Component/Axis/AxisHelper.cs @@ -219,7 +219,7 @@ namespace XCharts.Runtime if (axis.boundaryGap) { - scaleNum = dataCount > 2 && dataCount % splitNum == 0 ? + scaleNum = dataCount > 1 && dataCount % splitNum == 0 ? splitNum + 1 : splitNum + 2; }