Skip to content
Browse files

Add zero percent slice fix for IE and optmization for non-IE browsers.

  • Loading branch information...
1 parent 060e2bc commit 7bfc6c2efb1f6d70d3e129d0747fba8ccf544114 @mmurph211 committed Jan 12, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 javascripts/Chart.js
View
3 javascripts/Chart.js
@@ -108,6 +108,9 @@ var Chart = new Class({
slice[8] = Math.max(Math.round((slice[7] / (2 * Math.PI)) * mapVertices) - 2, 0); // Number of vertices to use from total for this slice
slice[9] = slice[7] / Math.max(slice[8], 1); // Vertices increment in radians
slice[10] = 0; // Used later for tracking
+ if (slice[4] === 0) {
+ continue;
+ }
// Gradient for colored slice:
ctxGradient = ctx.createRadialGradient(pieCenter, pieCenter, 0, pieCenter, pieCenter, pieRadius);

0 comments on commit 7bfc6c2

Please sign in to comment.
Something went wrong with that request. Please try again.