mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
Build single scales in core
This commit is contained in:
parent
5759f419c0
commit
ef1acfa0e8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user