]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Build radial scale details inside itself
authorTanner Linsley <tannerlinsley@gmail.com>
Tue, 16 Jun 2015 05:59:04 +0000 (23:59 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Tue, 16 Jun 2015 05:59:04 +0000 (23:59 -0600)
src/scales/scale.radialLinear.js

index 530c1ebe8f02135b3c266155aebe8de5b4af0ffa..130a43a5ac2866e97718bca85e580c00258904e4 100644 (file)
 
        var LinearRadialScale = Chart.Element.extend({
                initialize: function() {
+                       this.height = this.chart.height;
+                       this.width = this.chart.width;
+                       this.xCenter = this.chart.width / 2;
+                       this.yCenter = this.chart.height / 2;
                        this.size = helpers.min([this.height, this.width]);
+                       this.valuesCount = this.data.labels.length;
+                       this.labels = this.data.labels;
                        this.drawingArea = (this.options.display) ? (this.size / 2) - (this.options.labels.fontSize / 2 + this.options.labels.backdropPaddingY) : (this.size / 2);
                },
                update: function() {