From: Tanner Linsley Date: Tue, 16 Jun 2015 05:54:25 +0000 (-0600) Subject: Build single scales in core X-Git-Tag: 2.0.0-alpha3~10^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef1acfa0e85f5b2d5aca473eb5027b91f89d6fb1;p=thirdparty%2FChart.js.git Build single scales in core --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 694af7661..562978f13 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -121,6 +121,20 @@ this.scales[scale.id] = scale; }, this); } + + if (this.options.scale) { + // Build radial axes + var ScaleClass = Chart.scaleService.getScaleConstructor(axisOptions.type); + var scale = new ScaleClass({ + ctx: this.chart.ctx, + options: axisOptions, + data: this.data, + id: axisOptions.id, + chart: this.chart, + }); + + this.scale = scale; + } } Chart.scaleService.fitScalesForChart(this, this.chart.width, this.chart.height);