can i stop animation of graph ?
option "animation:false" -> No animation at all;
There is no possibility to suspend the animation.
@FVANCOP This should be a feature request. There should really be a hook for this kind of thing.
Suggested approaches: (based on pre existing knowledge not actual code)
window.requestAnimationFrame(). can be called. I will see if the onProgress hook can be used.If I look at the code and see where I can introduce it will you give me a try?
@dewwwald pretty old ticket and I'm not sure to understand what you are suggesting?
I don't think it's about cancelling the requested animation frame, but instead to cancel the whole animation, which (as 2017) can be achieved using chart.stop().
Oh really? So you can stop an animation until a more desired event occurs for the animation to execute?
3 use cases (since the initial question is quite ambiguous):
beforeRender hook allows to cancel rendering the chart (and thus animations) if a plugin returns false and trigger a new render() at a more appropriated moment.I wrote the deferred plugin to delayed the initial data animation (not the chart drawing) until the user scrolls to the chart. I hooked the beforeDatasetsUpdate since it was the only cancellable hook at the time of 2.1.5. When 2.5 will be released, I should extend my plugin to beforeRender or even beforeUpdate.
@simonbrunel Cool, thanks!