Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upChart does not properly update with animation in master #6104
Comments
This comment has been minimized.
This comment has been minimized.
|
@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. |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
@serhii-yakymuk you may want to be aware of this issue |
This comment has been minimized.
This comment has been minimized.
Yes, thanks. I'll try to look into it. |
This comment has been minimized.
This comment has been minimized.
|
@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: