From: Ben McCann Date: Tue, 7 Nov 2017 23:26:37 +0000 (-0800) Subject: Reset only when animating (#4923) X-Git-Tag: v2.7.2~1^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d415e617d8bb8d597ecd1a045f8dd777070de805;p=thirdparty%2FChart.js.git Reset only when animating (#4923) --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 9e4984a9a..5fd4b2d6a 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -365,9 +365,11 @@ module.exports = function(Chart) { me.updateLayout(); // Can only reset the new controllers after the scales have been updated - helpers.each(newControllers, function(controller) { - controller.reset(); - }); + if (me.options.animation && me.options.animation.duration) { + helpers.each(newControllers, function(controller) { + controller.reset(); + }); + } me.updateDatasets();