echarts
echarts copied to clipboard
changed weakFilter logic, so line charts will not disappear, while zoom
Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
What does this PR do?
it fixes some troubles with dataZoom in line charts, when line chart remain only 1-2 dots. and make bar charts dissapear when bars go beyond the edges of the chart
Fixed issues
https://github.com/apache/echarts/issues/17858 https://github.com/apache/echarts/issues/12720 https://github.com/apache/echarts/issues/13321 https://github.com/apache/echarts/issues/11240 https://github.com/apache/echarts/issues/10374
Details
Before: What was the problem?
if we use filterMode: none with bar chart we get problem with exceed but if we will use filterMode: weakFilter (as an example) our line charts on the same area with bar charts will disappear while zoom, if there is only 1-2 points (because there no way to make a line through 1 point)
with this simple change, line charts will be completed based on the values of the elements already existing on the chart
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
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.
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.
@Ovilia i can't find same logic in the src folder. I've tried to looking for "weakFilter" in project, but there only dist files. How do i find where to make changes?
The logic is at https://github.com/apache/echarts/blob/master/src/component/dataZoom/AxisProxy.ts#L318 Here's how to debug: https://github.com/apache/echarts/wiki/How-to-setup-the-dev-environment#3-run-and-debug
Hello there! As a test case, i'm does same changes in our version of library in our product. And my solution works well at this time. Look how it going now vs how it being in past (without my changes)
before:
before but while zoom (look how disappear horizontal lines):
now:
and now while zoom:
Any update on this PR? This would be extremely helpful as we are currently forced to use none filter, which is introducing bugs: https://github.com/apache/echarts/issues/18688
@Ovilia Please check my changes. I added test cases and did not touch the files in dist.
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-18202@635bfd9
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-18202@635bfd9
https://echarts.apache.org/examples/en/editor.html?version=PR-18202%40635bfd9&code=MYewdgzgLgBAJgQygmBeGBtAUDTByARjwBoYCBdYnfAJhLMuozwGZ6KrdmAWdxrvAFY-nfADYRTPAHZJAgBxz8ATnYA6af3wEADOrFbmBIqQJrBhwnVNqWlgmxt3RR3jZrks5ANxYsIAAcoAEtwNBgAb2oADwBBaOCIAC5IgF9RAE94xJSI9OoIAFMAJ2DC5MjqXCgMgMKUvAAbYLBCkir4JAQUxGRqfNxehAAtEBAAWxTsXFwomZmAM2DGqBKAWRA4epg8AHdChABrADFl1eL2-dw4hIgASTAt6JSdUXmauoaIZq2Lt5mABaFYIAcwBUBSLFeHVwEABIF2ABEugBlAEIOAIlJQYoAV0K_1wACMQFAoBMUjQdB1UtRPKlvEA
Look at filter and then try to zoom into. My changes does line not disapear at zoom in. When actual master makes it disapear.
Please check the screenshots above to make sure it works correctly
@Ovilia
I don't know why some checks not successful, first one was succes. Second was canceled at after 5 sec
@Skuperday You can dismiss that information.
@Ovilia Can you review my changes?