fix(polar): respect radiusAxis axisTick.inside and axisLabel.inside. close #17434 - #21776
Open
jayzhou2309 wants to merge 2 commits into
Open
jayzhou2309 wants to merge 2 commits into
jayzhou2309 wants to merge 2 commits into
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. |
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
radiusAxis.axisTick.insideandradiusAxis.axisLabel.insideflip the ticks and labels to the other side of the radius axis.Fixed issues
Details
Before: What was the problem?
layoutAxisinsrc/component/axis/RadiusAxisView.tspassedtickDirection: -1andlabelDirection: -1toAxisBuilderunconditionally. It never readinside, so both options were ignored. The cartesian (cartesianAxisHelper.ts) and single (singleAxisHelper.ts) axes do read them and negate the direction.After: How does it behave after the fixing?
layoutAxisreadsaxisTick.insideandaxisLabel.insideand uses direction1when set, the same flip the cartesian and single axes do. Minor ticks followtickDirectiontoo. The default (inside: false) layout is unchanged.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/axis/radiusAxis.test.tsrenders the option from the issue withinsideoff and on and checks the tick end offset and the label side.release(acb285f) theinside: truecase fails: the tick ends at-5and the label stays on the default side. With this fix it ends at5and the label moves across.time.test.tsroundTime_locale, fails the same way onreleasewithout this change (it depends on the local timezone).npx eslinton the changed files andnpx tsc --noEmitare clean.Merging options
Other information
AI disclosure: an AI agent (Claude Code) reproduced the issue on
release, wrote the test and the fix, and rannpx jest --config test/ut/jest.config.cjs,npx eslint, andnpx tsc --noEmit.🤖 Written and posted by an AI agent (Claude Code) on behalf of @jayzhou2309.