From c42ca0f097afc9f90f31968d3ec578a5ee7fe764 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Tue, 28 Feb 2023 13:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`Legend`=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=97=B6`Serie`=E7=9A=84`Label`=E4=B8=8D=E5=88=B7=E6=96=B0?= =?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/Internal/BaseChart.Serie.cs | 1 + Runtime/Serie/SerieHandler.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index c1561784..df87dfd9 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -65,6 +65,7 @@ slug: /changelog ## master +* (2023.02.28) 修复`Legend`点击时`Serie`的`Label`不刷新的问题 * (2023.02.26) 增加`DataZoom`的`startEndFunction`委托 * (2023.02.12) 重构`Component`相关代码,调整API接口 * (2023.02.10) 修复`Axis`在`Log`轴时某些情况下最小值不正确的问题 diff --git a/Runtime/Internal/BaseChart.Serie.cs b/Runtime/Internal/BaseChart.Serie.cs index 27e39bc9..282e5da5 100644 --- a/Runtime/Internal/BaseChart.Serie.cs +++ b/Runtime/Internal/BaseChart.Serie.cs @@ -647,6 +647,7 @@ namespace XCharts.Runtime public void SetSerieActive(Serie serie, bool active) { serie.show = active; + serie.RefreshLabel(); serie.AnimationReset(); if (active) serie.AnimationFadeIn(); UpdateLegendColor(serie.serieName, active); diff --git a/Runtime/Serie/SerieHandler.cs b/Runtime/Serie/SerieHandler.cs index e1ae60e8..184983a3 100644 --- a/Runtime/Serie/SerieHandler.cs +++ b/Runtime/Serie/SerieHandler.cs @@ -385,6 +385,7 @@ namespace XCharts.Runtime var isIgnore = serie.IsIgnoreIndex(serieData.index, defaultDimension); if (serie.show && currLabel != null && + currLabel.show && serieData.context.canShowLabel && !isIgnore) {