Skip to content

Conversation

@simonbrunel
Copy link
Member

Animation callbacks now receives animationObject directly with a reference on the associated chart (animation.chart), which deprecates animation.animationObject and animation.chartInstance. Also fix missing onComplete animation argument and update documentation about onComplete called with animation: null if animation is disabled.

Fixes #3781 #3911

Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animation object is passed even when animations are disabled.
Copy link
Member

@etimberg etimberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinks this looks good. I was going to comment that animationObject and chartInstance weren't maintained, but then I got to the Object.defineProperty calls at the end. 😄

@etimberg etimberg merged commit b92b256 into chartjs:master Mar 3, 2017
@simonbrunel simonbrunel deleted the animation-cleanup branch March 4, 2017 10:30
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.

Animation callback documentation needs clarification

2 participants