Go ProSign in

This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In

Hide playlist

    Use HTML Canvas arcTo, moveTo, and lineTo to draw a piece of a pie chart

    You might think that drawing a piece of a pie possible with the .arc method. However, in this lesson, you'll see why that is impossible. Instead we must draw a pie piece with the .arcTo canvas method.

    .arcTo takes x1, y1, x2, y2 and radius to draw a nifty arc shape. You then must use the moveTo and lineTo methods to complete the beautiful piece of a pie. As a bonus, the clearRect method is used to demonstrate clearing the canvas!

    You must be a Member to view code