fix(scale): #20265 when dataZomm.filterMode is “empty” or ‘none’, the line graph is scaled to only one category, it is not filtered correctly#20495
Conversation
|
Thanks for your contribution! |
|
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 |
d8babbc to
2b58ce1
Compare
|
@linlang171, respect for your effort. Your PR changes one line in function normalize. Searching further up the ladder on where it is used I find this: |
|
@100pah I found that the related codes were previously your commit. Can you help me review this pull request? |
|
@Ovilia @plainheart @100pah Could you help review this PR? |
debug 20265
|
No blocking issues found in my review. The fix is consistent with the root cause: when the visible extent collapses to a single value, |
Brief Information
This pull request is in the type of:
What does this PR do?
#20265
Fixed issues
Fixes #20265
Fixes #19666
Details
Before: What was the problem?
when dataZomm.filterMode is “empty” or ‘none’, the line graph is scaled to only one category, it is not filtered correctly
After: How does it behave after the fixing?
The data is correctly filtered. And The bug is caused by calling the normalize method when calculating rendering values. When extra [1]==extra [0], it does not consider the possibility of NaN and returns 0.5 directly
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information