echarts
echarts copied to clipboard
fix: legend inverse bug
Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
What does this PR do?
remove legend name duplicate to fix legend inverse bug
Details
Before: What was the problem?
legend selector inverse function not work when using multiple series with duplicate legend name reproduce link In the demo, you can see the legend reverse don't work, It's beacase there are many duplicate legend name in pie chart series data, and legend reverse function will traverse these legend names, which will cause multiple times reverse of same legend name.
After: How does it behave after the fixing?
this fixing add dupliate removal before legend data update. After the fixing, the legend reverse function work normally!
Document Info
One of the following should be checked.
- [x] This PR doesn't relate to document changes
- [ ] The document should be updated later
- [ ] The document changes have been made in apache/echarts-doc#xxx
Misc
ZRender Changes
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
- [ ] Please squash the commits into a single one when merging.
Other information
Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.
Congratulations! Your PR has been merged. Thanks for your contribution! 👍