mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Gracefully handle setting options.animation to false which occurs when migrating configs from v1.
This commit is contained in:
parent
784fa78267
commit
0c247dde28
@ -229,7 +229,7 @@
|
||||
|
||||
render: function render(duration, lazy) {
|
||||
|
||||
if ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration == 'undefined' && this.options.animation.duration !== 0)) {
|
||||
if (this.options.animation !== false && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration == 'undefined' && this.options.animation.duration !== 0))) {
|
||||
var animation = new Chart.Animation();
|
||||
animation.numSteps = (duration || this.options.animation.duration) / 16.66; //60 fps
|
||||
animation.easing = this.options.animation.easing;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user