apache / echarts

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

[Bug] magicType点击不同格式的展示不能有效立即生效 #19131

Open hhfgeg opened 1 year ago

hhfgeg commented 1 year ago

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=line-stack&version=5.4.3&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQDKYAhgMYDWOAJrADITQ6VEC-AGiJhgwLJBAFUxDACcIAc0U45VOqQgBnPuiFFcK6K2lF0rOvQIBtSgFEAtnQhZKg2JQCq0KHACCrDrulABqEKw4wLABQR4AIhByOAxgbh7UOHRyDAAWsHbQity8ALoCwuiKCiaEsrgAZhQeAMwApG5msAqKOU2UACztFcQARsBgog5UbR2yDDD03Bx0IzhYBGByAK445SJiWGOkprL1mWBbSSeysFp0AG44floAkk4q0vo3sO8QDAAqAE8QPhat8MMDQbYsMU0pQRlk4Vp6MxKGVZPxOpi9MNSH5NFprugwJCqAxLDhFMA5IDZqNgFtjFlAQBxOhSWD1OhYLQ4YbmSx0GyUACyMDh_x2cIA6mwJTktnCAGIKOHUSxqxlovboQH47REiEgqj3blSnW3VQQHCE2DWToyG7QOgOUH2JwuOmyEnGjwwnhe4jIxhMKj_cbcwMCqx2gCMACYAAzuWPNeMpxOxlPNfruACcydg8eahfjscT6OIX2IjtkztdVG8vmigSjRrd_t4_KDKNDHnD9Fc3ejQrt8aTKYAHOnYLG81mizn3PGC-5miW1-XKziHZ10PW3WEIlEYm2fR3YcPbr2wxGh3vYBYY9ZYwBWUtp5eZlOv3Oz1ewOuhb9FuWLdrWxAHlQCRJCkZ6kn6l4PsGzC3oObZPqO1hpoW64ziWC7rn-zQAUBa5JtusDVugEH7i6boZFkuT5IUSHfOeVCdm2KF9pQA6RlemE2NOhZ5p-sAFguYl_gmAGphus44ZR2KwGU_AANxAA

Steps to Reproduce

image

Current Behavior

magicType: {
        type: ['line', 'bar', 'stack']
    }

点击不同格式的展示不能有效立即生效

Expected Behavior

如点击成切换柱状图,无法有效切换

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

echarts-bot[bot] commented 1 year 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.

echarts-bot[bot] commented 1 year ago

@hhfgeg It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** [Bug] magicType clicking on different formats is not valid immediately
helgasoft commented 1 year ago

I think this is a documentation issue - stack is not explained, just mentioned. In fact it is not meant to be a switch, but a toggle button between bars and stacked bars. A typical usage for stack is this official example where it toggles between grouped and stacked bars. So the solution is - either explain this in the docs, or rewrite the code to make it a switch button. The latter is kind of tricky though, because only grouped bar data would be "switchable". Simple bars cannot be stacked, so what would the button do if someone is using it in such context?