From: Tanner Linsley Date: Thu, 30 Apr 2015 21:49:52 +0000 (-0600) Subject: Only draw positive radius arcs Fixes #592 X-Git-Tag: v1.1.0~30^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1092%2Fhead;p=thirdparty%2FChart.js.git Only draw positive radius arcs Fixes #592 --- diff --git a/src/Chart.Core.js b/src/Chart.Core.js index f6a6995be..2e26a8abb 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -1293,9 +1293,9 @@ ctx.beginPath(); - ctx.arc(this.x, this.y, this.outerRadius, this.startAngle, this.endAngle); + ctx.arc(this.x, this.y, this.outerRadius < 0 ? 0 : this.outerRadius, this.startAngle, this.endAngle); - ctx.arc(this.x, this.y, this.innerRadius, this.endAngle, this.startAngle, true); + ctx.arc(this.x, this.y, this.innerRadius < 0 ? 0 : this.innerRadius, this.endAngle, this.startAngle, true); ctx.closePath(); ctx.strokeStyle = this.strokeColor;