]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Build single scales in core
authorTanner Linsley <tannerlinsley@gmail.com>
Tue, 16 Jun 2015 05:54:25 +0000 (23:54 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Tue, 16 Jun 2015 05:54:25 +0000 (23:54 -0600)
src/core/core.controller.js

index 694af766113081d9b7d9b74eb44e16ee88ce2aae..562978f13541ac0839b8f39eb09c7fe713b2ad0d 100644 (file)
                                                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);