echarts
echarts copied to clipboard
fix(selectedMode): get data id first
Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
What does this PR do?
When xAxis is category, multiple data will share same name which cause muliple data selected under single selectedMode. So rearrange getSelectionKey, it should get id first then name.
Fixed issues
- Close #17206
Details
Before: What was the problem?
After: How does it behave after the fixing?
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
test/scatter-selectedMode.html
Others
Merging options
- [x] 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.
The pull request is marked to be PR: author is committer because you are a committer of this project.
ID is usually generated by echarts. It's hard for developers to tell the rule of generating id. And when they are handling the selectedMap, their app may break when they meet generated id beyond their expectations.
Also there are cases they may need using same name to link the data and being selected together. I think the main issue here is when we generating the name of scatter on the cateogry axis. We should not only use the category name. It's a rule originally designed for bar chart, but apparently it's not applicable to scatter chart.
@pissang So could we combine id and name for scatter, like name_id?
I urgently need this fix.
@susiwen8 why close ?
@zhaohuijun It's superseded by #18835