Skip to content

Looking for modern example of how to animate visx data points with react-spring #1484

Discussion options

You must be logged in to vote

Hey @ThaddeusChristopher 👋 thanks for checking out visx!

I ported the @visx/xychart animation logic to a standalone sandbox. It's a little complicated but hopefully understandable. There's a bit of nuance to getting animation to work with a variable number of points (e.g., react-spring can't interpolate between data arrays if they have differing numbers of points)

https://codesandbox.io/s/hopeful-bartik-mwzn0n?file=/Example.tsx

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@artidataio
Comment options

@williaster
Comment options

Answer selected by ThaddeusChristopher
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
3 participants