O'Reilly logo

Jump Start JavaScript by Don Nguyen, Ara Pehlivanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8Canvas

This chapter introduces the <canvas> element, which is part of the HTML5 specification. We’ll be using <canvas> to implement a productivity chart for our example application. The chart will update each time the data is changed. This will show the user how many tasks have been completed and how many remain unfinished. We’ll also add some shadowing and gradient effects to give our charts a more polished look.

What is Canvas?

The official specification states: “The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly.” Although the specification does not mandate an actual scripting language, JavaScript is generally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required