Gracefully handle setting options.animation to false which occurs when migrating configs from v1.

This commit is contained in:
Evert Timberg 2015-12-05 10:40:05 -05:00
parent 784fa78267
commit 0c247dde28

View File

@ -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;