Skip to content

fix(bar): recreate polar bars when the base axis changes between radius and angle with roundCap. close #21878 - #21879

Open
Anurag1428 wants to merge 1 commit into
apache:masterfrom
Anurag1428:fix-21878
Open

Anurag1428 wants to merge 1 commit into
apache:masterfrom
Anurag1428:fix-21878

Conversation

@Anurag1428

@Anurag1428 Anurag1428 commented Nov 29, 2026 •

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Recreate polar bar shapes when the base axis switches between radius and angle with roundCap on.

Fixed issues

Details

Before: What was the problem?

On update, an old polar bar was reused unless roundCap itself changed. But a polar bar is only a sausage when it is not radial, so after switching the category axis from the radius axis to the angle axis the old round sausage shapes were kept for bars that should be plain sectors. They drew as large overlapping blobs.

After: How does it behave after the fixing?

The check now compares the old element type with the shape the new layout needs, so the bars are recreated as sectors (and back to sausages when switched again). A unit test covers rings -> rays -> rings.

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

N.A.

Merging options

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

Other information

N.A.

@echarts-bot

echarts-bot Bot commented Nov 29, 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.

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: PR: doc ready, PR: awaiting doc, PR: doc unchanged

This message is shown because the PR description doesn't contain the document related template.

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