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

Making a pie chart with many data points


After the meeting concludes, we head back to our office to try and make the best of a possibly bad situation. We talk it over and decide to start on the product category pie chart first.

We have been in talks with the IT department, and they have created more data feeds for us. The one we will use for this chart returns an array of arrays. Each array has two elements: the division and product category as a label and the revenue for the last month. Here is the data it returns:

[
["Electronics - Computers", 134764.98],
["Nerd Corral - Service", 103405.96],
["Media & Software - Music CDs", 97045.54],
["Electronics - Game Consoles", 85518.01],
["Media & Software - DVDs/Blu-ray", 83181.89],
["Electronics - TVs", 76345.37],
["Media & Software - Digital Media", 53375.05],
["Nerd Corral - Parts", 47002.71],
["Media & Software - Software", 43670.49],
["Electronics - Media Streamers", 35632.50],
["Electronics - DVD/Blu-ray Players", 21379.50]...