Skip to content

Animate shapes like AreaClosed and Pie #1849

Closed Answered by williaster
lednhatkhanh asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @lednhatkhanh thanks for checking out visx. Animation in react requires custom implementation because react wasn't built to handle the fast back-to-back updates (60+ per second). Overall visx tries to not have an opinion on animation because there are many frameworks out there, which is why this functionality is only in xychart which is more of a "high level chart" library, not primitives, where we use the react-spring library which is very performant.

So my best recommendation is to check out the implementation in xychart and mimic that. e.g., AnimatedPath. Another option if you're interested could be migrating those animated primitives to the @visx/react-spring, where we already have

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lednhatkhanh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants