apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.75k stars 19.62k forks source link

[Bug] Toolbox magic type feature doesn't indicate default chart state #16473

Open zachsa opened 2 years ago

zachsa commented 2 years ago

Version

5.3.0

Link to Minimal Reproduction

https://nccrd.saeon.ac.za/reports

Steps to Reproduce

  1. Go to the link
  2. Look at the toolbox - the 'magic type' feature indicates no current state despite that the chart state does reflect one of the possible options (in this case stacked bar)

Current Behavior

The magic type feature allows for toggling between line/bar, and stacked/not stacked. In my case I have a bar chart that is stacked. When I include the magic type in the toolbox, none of the icons are selected. Because of this:

Expected Behavior

The magic type icons represent all possible 'states' of the chart. By default the charts render in one of these 'states'. The correct icons should show as 'on' on initial chart render

Environment

- OS: ALL
- Browser: ALL
- Framework: ALL

Any additional comments?

No response

echarts-bot[bot] commented 2 years ago

I'm sorry to close this issue for it lacks the necessary title. Please provide a descriptive and as concise as possible title to describe your problems or requests and then the maintainers or I will reopen this issue.

Every good bug report or feature request starts with a title. Your issue title is a critical element as it's the first thing maintainers see.

A good issue title makes it easier for maintainers to understand what the issue is, easily locate it, and know what steps they'll need to take to fix it.

Moreover, it's better to include keywords, as this makes it easier to find the issue self and similar issues in searches.

mietl commented 5 months ago

feature: { magicType: { show: true, type: ['line', 'bar'], iconStatus: { line: 'normal', bar: 'emphasis' } } }

You can set default indicate using the iconStatus bar: 'emphasis'