Chart.js: Reverse the animations

Created on 6 Oct 2013  路  4Comments  路  Source: chartjs/Chart.js

When animating away the chart I want to do the animation in reverse (so instead of the doughnut chart rotating in, it would rotate out).

I managed to get this effect by animating an identical sized chart on top (but all in white), using transform properties to mirror it vertically and then animating it in.

This is quite a wasteful way of doing it though, it'd be good if there were an animateOut option.

enhancement

Most helpful comment

With the PR in #3477 this can be achieved by doing

chart.reset();
chart.render();

All 4 comments

+1

@tannerlinsley : Does the new animation stuff in 2.0 support this?

With the new update function this should be possible. It won't be as easy as chart.reverse() but it's doable.

With the PR in #3477 this can be achieved by doing

chart.reset();
chart.render();
Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabrieldesouza picture gabrieldesouza  路  3Comments

adriantombu picture adriantombu  路  3Comments

gouthamrv picture gouthamrv  路  3Comments

JewelsJLF picture JewelsJLF  路  3Comments

nanospeck picture nanospeck  路  3Comments