From: Tanner Linsley Date: Tue, 4 Aug 2015 17:24:27 +0000 (-0600) Subject: chart.update(0) now draws instantly instead of not at all X-Git-Tag: 2.0.0-alpha4~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3706b0755c74b7a713c93b68dd0bf302ee1909e;p=thirdparty%2FChart.js.git chart.update(0) now draws instantly instead of not at all --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index bd843631b..a255167bf 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -237,7 +237,7 @@ render: function render(duration, lazy) { - if (this.options.animation.duration !== 0 || duration) { + if ((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;