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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access