Version
5.4.3
Link to Minimal Reproduction
Steps to Reproduce
Current Behavior
magicType: {
type: ['line', 'bar', 'stack']
}
点击不同格式的展示不能有效立即生效
Expected Behavior
如点击成切换柱状图,无法有效切换
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
2条答案
按热度按时间niwlg2el1#
@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
ix0qys7i2#
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?