Repository navigation
Conversation
…lose apache#15571 The stack button of magicType only regarded series as stacked when their `stack` was the inner keyword set by the button itself. So series stacked by users were stacked again on the first click (nothing changed, and separate stack groups were merged into one), and the original stack groups were lost after switching back from tiled. Now whether the series are stacked is decided by all of the target series, which also recognizes the stacks defined in `series.stack`, and the original stacks are restored when switching back to stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief Information
This pull request is in the type of:
What does this PR do?
Make the magicType
stackbutton recognize series that are already stacked byseries.stack, and restore those stack groups when switching back from tiled.Fixed issues
Details
Before: What was the problem?
The stack button only treated a series as stacked when its
stackwas the inner keyword set by the button itself (__ec_magicType_stack__). For series stacked by users (e.g.stack: 'cars'):groupAandgroupB) were merged into one single stack, and the original groups were never restored.After: How does it behave after the fixing?
series.stackvalue is shared by more than one series. So user-stacked charts switch to tiled on the first click.stackvalues are remembered per series id on the global model (like the dataZoom history) and restored when switching back. Series without a user-defined stack still use the inner magicType stack as before.stackname used by only one series (as intest/toolbox-stack.html) toggle the same way as before.Added unit tests in
test/ut/spec/component/toolbox/magicType.test.ts. They click the actual toolbox icon, and 3 of them fail without this change. The full unit test suite,tsc --noEmitand eslint pass.I used Claude Code to write this change.
Document Info
One of the following should be checked.
Misc
Security Checking
ZRender Changes
Related test cases or examples to use the new APIs
test/ut/spec/component/toolbox/magicType.test.tsMerging options
Other information
Related reports: #16473, #20371, #20031, #13103.