Skip to content

[Bug]: The state of custom legend item isn't restored when updating the data #3087

@elitemineral

Description

@elitemineral

Describe the bug / 问题描述

The state of custom legend item isn't restored when updating the data.

Reproduction link / 复现链接

https://codesandbox.io/p/sandbox/compassionate-mcclintock-ytxnsk

Steps to Reproduce the Bug or Issue / 重现步骤

  1. Click legend item with name Type 1
  2. Click Update Data button.

Expected behavior

legend item with name Type 1 is active (colored) or it should stay disabled but blue column should be hidden.

Actual behavior

legend item with name Type 1 is disabled (gray) but blue column is visible.

Version / 版本

@ant-design/charts - 1.4.2
@ant-design/plots - 1.2.6

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions