Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
All of the canvas API commands
discussed in this chapter, plus other advanced commands (for complex
curves, etc.), can be combined to create very nice-looking graphs that
visualize data, either as line, pie, or other types of charts.
As you can probably imagine, the complexity of such a task is quite high. So, we will not discuss specifically how to draw your own graphs, but will instead show how to use a simple, free graphing library (which does the hard work for you!) called flot.
The flot library uses jQuery, so you need to load a recent version of jQuery first, and then the latest release of the flot library: