From: Evert Timberg Date: Sat, 5 Dec 2015 15:40:05 +0000 (-0500) Subject: Gracefully handle setting `options.animation` to `false` which occurs when migrating... X-Git-Tag: 2.0.0-beta2~31^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1743%2Fhead;p=thirdparty%2FChart.js.git Gracefully handle setting `options.animation` to `false` which occurs when migrating configs from v1. --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 0edea25c6..b12c430a4 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -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;