From 45159b186f5525127446e6507a3649f9daab4f94 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Fri, 30 Jun 2023 07:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`Axis`=E7=9A=84`IndicatorLabe?= =?UTF-8?q?l`=E6=97=A0=E6=B3=95=E8=87=AA=E5=AE=9A=E4=B9=89`color`=E7=9A=84?= =?UTF-8?q?=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/Tooltip/TooltipHandler.cs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index b8b3b7d1..28dd3f13 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -66,6 +66,7 @@ slug: /changelog ## master +* (2023.06.30) 修复`Axis`的`IndicatorLabel`无法自定义`color`的问题 * (2023.06.12) 修复`AxisLabel`的`formatterFunction`在数值轴时`value`不对的问题 ## v3.7.0 diff --git a/Runtime/Component/Tooltip/TooltipHandler.cs b/Runtime/Component/Tooltip/TooltipHandler.cs index c730a820..e60c7278 100644 --- a/Runtime/Component/Tooltip/TooltipHandler.cs +++ b/Runtime/Component/Tooltip/TooltipHandler.cs @@ -210,7 +210,11 @@ namespace XCharts.Runtime label.color = textColor; else label.color = axis.indicatorLabel.background.color; - label.SetTextColor(Color.white); + + if (ChartHelper.IsClearColor(axis.indicatorLabel.textStyle.color)) + label.SetTextColor(Color.white); + else + label.SetTextColor(axis.indicatorLabel.textStyle.color); } private ISerieContainer GetPointerContainerAndSeries(Tooltip tooltip, List list)