]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix
authorTanner Linsley <tannerlinsley@gmail.com>
Wed, 3 Jun 2015 20:17:10 +0000 (14:17 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Wed, 3 Jun 2015 20:17:10 +0000 (14:17 -0600)
src/Chart.Doughnut.js

index 553a831a24ae5a5c799289f2fc540da0a3353409..a6db6cb82c3f007df6b111d66864d00eba5895d5 100644 (file)
@@ -18,7 +18,7 @@
 
         //The percentage of the chart that we cut out of the middle.
 
-        cutoutPercentage: 1,
+        cutoutPercentage: 50,
 
     };
 
@@ -78,7 +78,7 @@
         update: function() {
 
             this.outerRadius = (helpers.min([this.chart.width, this.chart.height]) - this.options.elements.slice.borderWidth / 2) / 2;
-            this.innerRadius = (this.outerRadius / 100) * this.options.cutoutPercentage;
+            this.innerRadius = this.options.cutoutPercentage ? (this.outerRadius / 100) * (this.options.cutoutPercentage) : 1;
             this.radiusLength = (this.outerRadius - this.innerRadius) / this.data.datasets.length;