Skip to content

Commit

Permalink
Reset only when animating (chartjs#4923)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored and yofreke committed Dec 30, 2017
1 parent 155a436 commit 0dfbd52
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/core.controller.js
Expand Up @@ -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();

Expand Down

0 comments on commit 0dfbd52

Please sign in to comment.