Merge pull request #1743 from nnnick/fix/1576

Gracefully handle setting `options.animation` to `false`
This commit is contained in:
Evert Timberg 2015-12-05 10:44:24 -05:00
commit 52ae1f7d3c

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;