Convert the radialLinear scale to derive from Core.scale. Radial linear scale is now fit using the scale service. Added tests for the radialLinear scale.

This commit is contained in:
Evert Timberg
2015-09-27 11:58:20 -04:00
parent be4facdea9
commit bc7d1d39fd
7 changed files with 868 additions and 153 deletions

View File

@@ -97,13 +97,6 @@
},
update: function update(reset) {
Chart.scaleService.update(this, this.chart.width, this.chart.height);
//this.chart.scale.setScaleSize();
this.chart.scale.calculateRange();
this.chart.scale.generateTicks();
this.chart.scale.buildYLabels();
this.chart.outerRadius = Math.max((helpers.min([this.chart.chart.width, this.chart.chart.height]) - this.chart.options.elements.arc.borderWidth / 2) / 2, 0);
this.chart.innerRadius = Math.max(this.chart.options.cutoutPercentage ? (this.chart.outerRadius / 100) * (this.chart.options.cutoutPercentage) : 1, 0);
this.chart.radiusLength = (this.chart.outerRadius - this.chart.innerRadius) / this.chart.data.datasets.length;

View File

@@ -120,11 +120,6 @@
var scale = this.chart.scale;
var scaleBase;
scale.setScaleSize();
scale.calculateRange();
scale.generateTicks();
scale.buildYLabels();
if (scale.min < 0 && scale.max < 0) {
scaleBase = scale.getPointPositionForValue(0, scale.max);
} else if (scale.min > 0 && scale.max > 0) {