Default animations
All Recharts components animate by default when they first render:Animation props
Control animation behavior on Line, Area, Bar, and other graphical components.Enable/disable animations
Setting
isAnimationActive="auto" disables animations in SSR and respects the user’s prefers-reduced-motion system preference for accessibility.Animation duration
Control how long animations take (in milliseconds):Animation easing
Choose the easing function for smooth transitions:Animation delay
Delay the start of the animation:Staggered animations
Create sequential animations by delaying each series:Animation on data updates
By default, Recharts animates when data changes:Animate new values
Control whether new data points animate:Chart-specific animations
Line chart animations
Lines draw from left to right:Area chart animations
Areas fill from bottom to top:Bar chart animations
Bars grow from the baseline:Tooltip animations
Control tooltip animation behavior:Performance considerations
Disable animations for large datasets
For charts with many data points, animations can impact performance:Reduce animation duration
Shorter animations feel snappier and reduce rendering time:Accessibility
Respect user preferences
Always respect theprefers-reduced-motion setting:
Provide instant alternatives
For critical data visualization, consider offering a “skip animation” option:Advanced patterns
Coordinated multi-series animations
Animate multiple series together:Custom easing curves
Use CSS easing functions:- Material Design standard:
cubic-bezier(0.4, 0.0, 0.2, 1) - Ease-in-out (smooth):
cubic-bezier(0.42, 0, 0.58, 1) - Bounce:
cubic-bezier(0.68, -0.55, 0.265, 1.55)
Animation on hover
Animate dots when hovering:Best practices
SSR compatibilitySet
isAnimationActive="auto" to prevent animation issues during server-side rendering.