Skip to content

fix(polar): respect radiusAxis axisTick.inside and axisLabel.inside. close #17434 - #21776

Open
jayzhou2309 wants to merge 2 commits into
apache:releasefrom
jayzhou2309:fix/radius-axis-inside
Open

jayzhou2309 wants to merge 2 commits into
apache:releasefrom
jayzhou2309:fix/radius-axis-inside

Conversation

@jayzhou2309

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Make radiusAxis.axisTick.inside and radiusAxis.axisLabel.inside flip the ticks and labels to the other side of the radius axis.

Fixed issues

Details

Before: What was the problem?

layoutAxis in src/component/axis/RadiusAxisView.ts passed tickDirection: -1 and labelDirection: -1 to AxisBuilder unconditionally. It never read inside, 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?

layoutAxis reads axisTick.inside and axisLabel.inside and uses direction 1 when set, the same flip the cartesian and single axes do. Minor ticks follow tickDirection too. The default (inside: false) layout is unchanged.

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

test/ut/spec/component/axis/radiusAxis.test.ts renders the option from the issue with inside off and on and checks the tick end offset and the label side.

  • On release (acb285f) the inside: true case fails: the tick ends at -5 and the label stays on the default side. With this fix it ends at 5 and the label moves across.
  • Full unit suite: 216 of 217 pass. The one failure, time.test.ts roundTime_locale, fails the same way on release without this change (it depends on the local timezone).
  • npx eslint on the changed files and npx tsc --noEmit are clean.

Merging options

  • Please squash the commits into a single one when merging.

Other information

AI disclosure: an AI agent (Claude Code) reproduced the issue on release, wrote the test and the fix, and ran npx jest --config test/ut/jest.config.cjs, npx eslint, and npx tsc --noEmit.


🤖 Written and posted by an AI agent (Claude Code) on behalf of @jayzhou2309.

@echarts-bot

echarts-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant