Skip to content

fix(radar): start symbol entry animation from the center. close #21774 - #21775

Open
kwy404 wants to merge 1 commit into
apache:masterfrom
kwy404:fix-radar-symbol-init-animation
Open

kwy404 wants to merge 1 commit into
apache:masterfrom
kwy404:fix-radar-symbol-init-animation

Conversation

@kwy404

@kwy404 kwy404 commented Oct 2, 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?

Makes radar symbols travel out from the center together with the line and area on the entry animation, as they did in 4.x.

Fixed issues

Details

Before: What was the problem?

Root cause: in the add branch of RadarView, graphic.initProps(polyline, target, ...) runs before updateSymbols(polyline.shape.points, ...). Since 5.x, initProps animates with setToFinal: true, so it already writes the final shape onto the element, so polyline.shape.points holds the target points by the time updateSymbols reads it. Each symbol is therefore placed at its final position and animated from there to the same position, so it shows up at the end point on the first frame while the line grows from the center.

After: How does it behave after the fixing?

Fix: pass getInitialPoints(points) (the radar center for every point, the same start used for the polygon and polyline) as the start points to updateSymbols instead of reading them back from the polyline. The update path is unchanged.

Test: added test/ut/spec/series/radar.test.ts, which renders a radar series with the default animation and checks that the first symbol starts at the radar center [200, 200]. It fails before the fix (received [200, 100], the final point) and passes after it.

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

The reproduction from the issue: https://codepen.io/martinburch/pen/pveWoEy

@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.

@martinburch

Copy link
Copy Markdown

Thanks, @kwy404 ! The fix is exactly as I proposed, and I think the test is high quality. I like how this can be an automated code test rather than a visual image-comparison test. Thanks again for your implementation 😃

@kwy404

kwy404 commented Oct 2, 2026

Copy link
Copy Markdown
Author

Thanks @martinburch, and thanks for the clear analysis in the issue, it made the fix straightforward.

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.

2 participants