Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] animation.onComplete callback has no param passed to it. #3911

Closed
Moghul opened this issue Feb 15, 2017 · 2 comments
Closed

[BUG] animation.onComplete callback has no param passed to it. #3911

Moghul opened this issue Feb 15, 2017 · 2 comments
Assignees
Milestone

Comments

@Moghul
Copy link

Moghul commented Feb 15, 2017

Expected Behavior

When providing options for a chart, you can set some properties for the animation.

One of the properties is a callback for when the animation is complete. According to the documentation, the callback is passed the same object that the onProgress callback is passed.

Current Behavior

The passed parameter is undefined.

Possible Solution

Haven't looked into fixing it.

Steps to Reproduce (for bugs)

  1. Open up Chart.js>samples>animation>progress-bar.html.
  2. Add 'console.log(animation);' on line 71.
  3. Open the file in a browser
  4. See undefined in the console log.

Context

Just something I ran into while trying to get a hold of an instance of the chart.

Environment

  • Chart.js version: 2.5.0
  • Browser name and version: Any, not browser related.
@etimberg
Copy link
Member

That's odd given we pass the animation object too it: /~https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js#L117

@etimberg
Copy link
Member

etimberg commented Mar 8, 2017

Fixed in #3959

@etimberg etimberg closed this as completed Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants