Book Image

Learning jqPlot

By : Scott Gottreu
Book Image

Learning jqPlot

By: Scott Gottreu

Overview of this book

Table of Contents (19 chapters)
Learning jqPlot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating charts with multiple data series


As we begin thinking about how to expand this report, we get another e-mail from Sara.

"Hey, I got to thinking and we've cut purchasing in some product categories. We're taking heat from the rest of the team because they think we're being too cautious. Can you create a chart with the four product categories I included? You'll also find revenue numbers for the last six quarters."

We start thinking about how this chart will work. We know that each category will be a data series, and so, there will be four bars listed for each quarter for a total of 24 bars. With the default margins and padding, our bars will be resized to tiny slivers. So, we'll need to change some formatting. Also, since we have multiple data series, we will have to set the ticks for our x axis separately. With these parameters, we set about building our chart executing the following steps:

  1. We include the plugins we've been using:

    <script src="../js/jqplot.categoryAxisRenderer.min...