]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
remove unnecessary extra init steps
authorEvert Timberg <evert.timberg+github@gmail.com>
Sun, 22 Jan 2017 18:23:42 +0000 (13:23 -0500)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sun, 22 Jan 2017 20:16:35 +0000 (15:16 -0500)
src/core/core.controller.js

index 616df547be77dab5e7b40cd3ca1af73a5f513f50..1d2366152ec6350f1bdd51e710215cbcf2c94d29 100644 (file)
@@ -121,13 +121,9 @@ module.exports = function(Chart) {
                                me.resize(true);
                        }
 
-                       // Make sure controllers are built first so that each dataset is bound to an axis before the scales
-                       // are built
+                       // Make sure scales have IDs and are built before we build any controllers.
                        me.ensureScalesHaveIDs();
-                       me.buildOrUpdateControllers();
                        me.buildScales();
-                       me.updateLayout();
-                       me.resetElements();
                        me.initToolTip();
                        me.update();
 
@@ -256,10 +252,6 @@ module.exports = function(Chart) {
                        Chart.scaleService.addScalesToLayout(this);
                },
 
-               updateLayout: function() {
-                       Chart.layoutService.update(this, this.chart.width, this.chart.height);
-               },
-
                buildOrUpdateControllers: function() {
                        var me = this;
                        var types = [];