Skip to content

Instantly share code, notes, and snippets.

@ozelfatih
Created January 16, 2017 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozelfatih/0102b13de116527104a9c370c76dcf0f to your computer and use it in GitHub Desktop.
Save ozelfatih/0102b13de116527104a9c370c76dcf0f to your computer and use it in GitHub Desktop.
function drawPieSlice(ctx,centerX, centerY, radius, startAngle, endAngle, color ){
ctx.fillStyle = color;
ctx.beginPath();
ctx.moveTo(centerX,centerY);
ctx.arc(centerX, centerY, radius, startAngle, endAngle);
ctx.closePath();
ctx.fill();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment