feat(brush): support brush selection on line series
Brief Information
This pull request is in the type of:
- [ ] bug fixing
- [x] new feature
- [ ] others
What does this PR do?
This PR adds the support brushing selection to line series. Previously,
This pull requests adds brushSelector to the LineSeries
Fixed issues
- https://github.com/apache/echarts/issues/14258
- https://github.com/apache/echarts/issues/18155
Details
Before: What was the problem?
brushselected event returned an empty dataIndex array which makes it hard to figure out which points are selected with brushing.
After: How does it behave after the fixing?
LineSeriesModel implements brushSelector method where it gets point coordinates by dataIndex and then uses brush selector to understand if the point should be selected.
Document Info
One of the following should be checked.
- [ ] This PR doesn't relate to document changes
- [ ] The document should be updated later
- [x] The document changes have been made in apache/echarts-doc#367
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.
⚠️ MISSING DOCUMENT INFO: Please make sure one of the document options are checked in this PR's description. Search "Document Info" in the description of this PR. This should be done either by the author or the reviewers of the PR.
Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19193@632e106
Hello, how can I use it in JavaScript.
Hi!
I need this option
@alxnddr @Ovilia any news about this PR being merged ?
@alxnddr @Ovilia any chance we can get this PR merged soon?
I think lines should also be gray when out of range. This PR only makes item gray. @alxnddr Please update the implement to make sure the lines are also working as expected.
That's the PR I need at the moment