]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Gracefully handle setting `options.animation` to `false` which occurs when migrating... 1743/head
authorEvert Timberg <evert.timberg@gmail.com>
Sat, 5 Dec 2015 15:40:05 +0000 (10:40 -0500)
committerEvert Timberg <evert.timberg@gmail.com>
Sat, 5 Dec 2015 15:40:05 +0000 (10:40 -0500)
src/core/core.controller.js

index 0edea25c640f26bcb69a2002bc8d34f9c3513e98..b12c430a40555630c9a5e6928c750ba31047aaa0 100644 (file)
 
                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;