Skip to content

[Bug] selected in legend cannot retrieve information #20930

@Amelia-rgb18

Description

@Amelia-rgb18

Version

https://echarts.apache.org/en/js/vendors/echarts/dist/echarts.min.js

Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/basic-line-chart-forked-8frt7c?file=%2Findex.js%3A13%2C5

Steps to Reproduce

open the console and you can see that the output information is {}

Current Behavior

open the console and you can see that the output information is {}

Image

Expected Behavior

The selected in getOption can output the current information, such as the current status.

{
    'Union Ads': true,
    'Video Ads': true,
    'Direct': true,
    'Search Engine': true,
    'Email': true
}

Environment

- OS: macOS Sonoma 14.1.1 (23B81)
- Browser: Chrome 134.0.6998.166

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions