From: Evert Timberg Date: Sat, 8 Aug 2015 14:14:37 +0000 (-0400) Subject: Fix the outerRadius calculation with respect to the border width. Previously the... X-Git-Tag: 2.0.0-alpha4~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dfa9e8e663157bab6af317961eda98e84e2c391;p=thirdparty%2FChart.js.git Fix the outerRadius calculation with respect to the border width. Previously the border width was divided by 2 twice rather than once. --- diff --git a/src/controllers/controller.doughnut.js b/src/controllers/controller.doughnut.js index 454ec5498..8b161c29a 100644 --- a/src/controllers/controller.doughnut.js +++ b/src/controllers/controller.doughnut.js @@ -88,7 +88,7 @@ update: function(reset) { - this.chart.outerRadius = (helpers.min([this.chart.chart.width, this.chart.chart.height]) - this.chart.options.elements.arc.borderWidth / 2) / 2; + this.chart.outerRadius = (helpers.min([this.chart.chart.width, this.chart.chart.height]) / 2) - this.chart.options.elements.arc.borderWidth / 2; this.chart.innerRadius = this.chart.options.cutoutPercentage ? (this.chart.outerRadius / 100) * (this.chart.options.cutoutPercentage) : 1; this.chart.radiusLength = (this.chart.outerRadius - this.chart.innerRadius) / this.chart.data.datasets.length;