From 0c247dde282ffa5f8b1767fc313e770e61ad98c1 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sat, 5 Dec 2015 10:40:05 -0500 Subject: [PATCH] Gracefully handle setting `options.animation` to `false` which occurs when migrating configs from v1. --- src/core/core.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2