-
Notifications
You must be signed in to change notification settings - Fork 19.8k
fix: dataZoom incorrectly filters stacked data #21372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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. To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: This message is shown because the PR description doesn't contain the document related template. |
|
updated to conform to PR template |
| } | ||
|
|
||
| zrUtil.each(dataDims, function (dim, index) { | ||
| dataDims[index] = getStackedDimension(seriesData, dim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be unexpected to me because this makes const dataDims = seriesData.mapDimensionsAll(axisDim); almost useless.
Found these comments might be related. @100pah Please help review this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be unexpected to me because this makes const dataDims = seriesData.mapDimensionsAll(axisDim); almost useless.
- The
mapDimensionsAll(axisDim)call is necessary to get all dimensions that map to this axis. - Then
getStackedDimension()transforms each dimension to its stacked result dimension only if that dimension is stacked - otherwise it returns the original dimension unchanged.
an alternative would be maybe to define dataDims like this, and then not overwrite the elements later, I was just concerned this would be less clear
const dataDims = zrUtil.map(
seriesData.mapDimensionsAll(axisDim),
dim => getStackedDimension(seriesData, dim)
);
Brief Information
This pull request is in the type of:
What does this PR do?
fixes #21371 dataZoom + stacked series + scale causing missing datapoints.
Fixed issues
#21371
Details
Before: What was the problem?
DataZoom calculated valueWindow from stacked extents but filtered using original (unstacked) dimension values, causing incorrect point removal.
After: How does it behave after the fixing?
Transform dimensions to use stackResultDimension before filtering.
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