recharts / react-smooth

react animation
MIT License
277 stars 38 forks source link

Fix/animation duration #77

Closed ckifer closed 1 year ago

ckifer commented 1 year ago

Animation duration of 0 causes a crash in the browser when used with dashed line charts.

This is because NaN gets computed for one of the t properties.

If animationDuration is less than or equal to 0 - treat it as if animation is disabled. 0 is equal to off and less than 0 doesn't make sense.

This fixes https://github.com/recharts/recharts/issues/3565

Release new version after merge