-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Chart does not properly update with animation in master #6104
Comments
@emmcbd can you please provide a codepen or jsfiddle that reproduces this issue? you can use https://chartjs.org/dist/master/Chart.min.js which is the latest build from master. |
Here a reproduce case with tooltips, which is easier to reproduce: master: https://codepen.io/anon/pen/pYyWbK Quickly move your mouse over the chart, you will see that the tooltip does not move (or with very jerky animation) until you stop moving. If you switch back Chart.js to version 2.7.3, or revert #5331, everything is fine again. |
@serhii-yakymuk you may want to be aware of this issue |
Yes, thanks. I'll try to look into it. |
@benmccann |
Regression from #5331
I have a chart parameterized by a slider, so as the user is moving the slider, I repeatedly call update() on the chart to reflect the new parameter value in real time.
It is working well with version 2.7.3, but when testing with master, the chart does not update until the user stops moving the slider.
I found that this is a regression from #5331 which removes the drop frame mechanism. As the update() method is called nearly each frame, the animation start time is also reset each frame, and consequently the chart is updated each frame with an animation progress of zero.
The same bug appears on tooltip animation with a line chart configured like this:
tooltips: { mode: 'nearest', intersect: false }
As moving the mouse cursor on the chart:
The text was updated successfully, but these errors were encountered: