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

nanospeck picture nanospeck  路  3Comments

akashrajkn picture akashrajkn  路  3Comments

adriantombu picture adriantombu  路  3Comments

SylarRuby picture SylarRuby  路  3Comments

HeinPauwelyn picture HeinPauwelyn  路  3Comments