]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Call update() and render() with a config object (#5592)
authorAkihiko Kusanagi <nagi@nagi-p.com>
Sun, 24 Jun 2018 18:31:51 +0000 (04:31 +1000)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sun, 24 Jun 2018 18:31:51 +0000 (14:31 -0400)
src/core/core.controller.js

index 3445cb51801fe5d6781a28037e7215bf67c92178..48365fb224d085d3188332880bf32daaf0f59eb5 100644 (file)
@@ -207,7 +207,9 @@ module.exports = function(Chart) {
                                }
 
                                me.stop();
-                               me.update(me.options.responsiveAnimationDuration);
+                               me.update({
+                                       duration: me.options.responsiveAnimationDuration
+                               });
                        }
                },
 
@@ -884,7 +886,10 @@ module.exports = function(Chart) {
 
                                // We only need to render at this point. Updating will cause scales to be
                                // recomputed generating flicker & using more memory than necessary.
-                               me.render(me.options.hover.animationDuration, true);
+                               me.render({
+                                       duration: me.options.hover.animationDuration,
+                                       lazy: true
+                               });
                        }
 
                        me._bufferedRender = false;