修复Legend点击时SerieLabel不刷新的问题

This commit is contained in:
monitor1394
2023-02-28 13:11:18 +08:00
parent 8c6d013341
commit c42ca0f097
3 changed files with 3 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ slug: /changelog
## master ## master
* (2023.02.28) 修复`Legend`点击时`Serie``Label`不刷新的问题
* (2023.02.26) 增加`DataZoom``startEndFunction`委托 * (2023.02.26) 增加`DataZoom``startEndFunction`委托
* (2023.02.12) 重构`Component`相关代码调整API接口 * (2023.02.12) 重构`Component`相关代码调整API接口
* (2023.02.10) 修复`Axis``Log`轴时某些情况下最小值不正确的问题 * (2023.02.10) 修复`Axis``Log`轴时某些情况下最小值不正确的问题

View File

@@ -647,6 +647,7 @@ namespace XCharts.Runtime
public void SetSerieActive(Serie serie, bool active) public void SetSerieActive(Serie serie, bool active)
{ {
serie.show = active; serie.show = active;
serie.RefreshLabel();
serie.AnimationReset(); serie.AnimationReset();
if (active) serie.AnimationFadeIn(); if (active) serie.AnimationFadeIn();
UpdateLegendColor(serie.serieName, active); UpdateLegendColor(serie.serieName, active);

View File

@@ -385,6 +385,7 @@ namespace XCharts.Runtime
var isIgnore = serie.IsIgnoreIndex(serieData.index, defaultDimension); var isIgnore = serie.IsIgnoreIndex(serieData.index, defaultDimension);
if (serie.show && if (serie.show &&
currLabel != null && currLabel != null &&
currLabel.show &&
serieData.context.canShowLabel && serieData.context.canShowLabel &&
!isIgnore) !isIgnore)
{ {