Chapter 7. Creating Graphs and Charts

In this chapter, we will cover:

  • Creating a pie chart
  • Creating a bar chart
  • Graphing equations
  • Plotting data points with a line chart

Introduction

By now you may have noticed that Chapters 1 to 4 cover HTML5 canvas basics, Chapters 5 and 6 cover advanced topics, while Chapters 7 and 8 cover real life implementations. After all, what good is it to learn about the canvas if we aren't able to produce something useful? This chapter focuses on doing just that by creating some real life canvas applications by creating a pie chart, a bar chart, graphs, and a line chart. In contrast to the previous chapters, this chapter contains only four recipes because each recipe provides a complete, easily configurable, and production-ready ...

Get HTML5 Canvas Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.