fix(scale): correct bar height when zoomed with dataZoom filterMode i…#21524
fix(scale): correct bar height when zoomed with dataZoom filterMode i…#21524akashsonune wants to merge 2 commits intoapache:masterfrom
Conversation
|
Thanks for your contribution! Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only. |
eec6f72 to
b7f7313
Compare
| // When extent collapses to a single point, only values equal to that point | ||
| // should be normalized to 0.5. All other values should return NaN to indicate | ||
| // they are out of range and should not be rendered. | ||
| return isNaN(val) || val !== extent[0] ? NaN : 0.5; |
There was a problem hiding this comment.
I'm not sure val !== extent[0] is expected, please also help test the cases for markPoints to display correctly for single data.
There was a problem hiding this comment.
@Ovilia I added tests for markpoint. also I feel the condition val !== extent[0] is needed becuase When the range collapses to a single point, only the value that matches that point should be drawn. Everything else should be ignored (NaN).
Without this check, ALL bars try to draw at the same position, causing the visual bug where zoomed single bar looks like it has value of the highest bar in the series
…s none
Fixes #19666
Brief Information
This pull request is in the type of:
What does this PR do?
Fixed issues
Details
Before: What was the problem?
After: How does it behave after the fixing?
Document Info
One of the following should be checked.
Misc
Security Checking
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Merging options
Other information