Disable Animation with Charts.js

Cronner picture Cronner · Jan 27, 2014 · Viewed 80k times · Source

I'm having some trouble turning off the animation with charts.js.

This is my code:

var pieData = [
    {
        value: 30,
        color:"#F38630"
    },
    {
        value : 50,
        color : "#E0E4CC"
    },
    {
        value : 100,
        color : "#69D2E7"
    }    
];

var myPie = new Chart(document.getElementById("canvas").getContext("2d")).Pie(pieData);

Can anyone provide an example?

Answer

palermuke picture palermuke · Apr 27, 2017
options: {
    animation: {
        duration: 0
    }
}