Irrelevant_Coder
Irrelevant_Coder

Reputation: 231

ChartJs - Disable Animations

I am using ChartJS inside of an angular 7 application. I want to disable the animations on my line series because the series is constantly being updated. I have tried setting

options: {
    animations: false 
}

as well as

options: {
    animation: {
        duration: 0
    }
}

Neither of these worked.

Are there any other options/functions I need to add to the Chart configuration to disable animations?

Upvotes: 2

Views: 3581

Answers (1)

Irrelevant_Coder
Irrelevant_Coder

Reputation: 231

I found the answer referenced here in the documentation. I just needed to pass a '0' in the update function like so:

this.chart.update(0);

Upvotes: 3

Related Questions