From 1bb9b455b4e1b02fb3d56f3e6cfcdd18ddbd4aca Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Sat, 27 Jul 2024 23:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4`Axis`=E7=9A=84`AxisName`?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 1 + Runtime/Component/Axis/XAxis/XAxis.cs | 1 + Runtime/Component/Axis/YAxis/YAxis.cs | 2 ++ 3 files changed, 4 insertions(+) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index b9021da8..1604a648 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -75,6 +75,7 @@ slug: /changelog ## master +* (2024.07.27) 调整`Axis`的`AxisName`的默认位置 * (2024.07.22) 优化`Pie`的`Label`在`Tooltip`触发时的表现 * (2024.07.21) 修复`Tooltip`在开启`DataZoom`时指示内容不准确的问题 * (2024.07.17) 修复`MarkLine`的`Label`在初始化时可能会闪烁的问题 diff --git a/Runtime/Component/Axis/XAxis/XAxis.cs b/Runtime/Component/Axis/XAxis/XAxis.cs index 29ba477e..c4d5742c 100644 --- a/Runtime/Component/Axis/XAxis/XAxis.cs +++ b/Runtime/Component/Axis/XAxis/XAxis.cs @@ -28,6 +28,7 @@ namespace XCharts.Runtime splitLine.show = false; splitLine.lineStyle.type = LineStyle.Type.None; axisLabel.textLimit.enable = true; + axisName.labelStyle.offset = new Vector3(5, 0, 0); } } } \ No newline at end of file diff --git a/Runtime/Component/Axis/YAxis/YAxis.cs b/Runtime/Component/Axis/YAxis/YAxis.cs index d01f8ec1..9569c58e 100644 --- a/Runtime/Component/Axis/YAxis/YAxis.cs +++ b/Runtime/Component/Axis/YAxis/YAxis.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using UnityEngine; namespace XCharts.Runtime { @@ -25,6 +26,7 @@ namespace XCharts.Runtime splitLine.lineStyle.type = LineStyle.Type.None; axisLabel.textLimit.enable = false; axisTick.showStartTick = true; + axisName.labelStyle.offset = new Vector3(0, 22, 0); } } } \ No newline at end of file