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

Building a block plot


We receive another e-mail from Sara. She forgot to send us numbers for the other electronics categories she wanted us to chart. Having created a bubble chart, we decide to create a block plot.

A block plot is one of those charts that has different implementations or definitions. Block plots in jqPlot are similar to bubble charts, but the data points are rendered as a block instead of as a bubble. Also, block plots only use x and y values, so the blocks are all of the same size. Their sizes will differ slightly because of the length of the label for each data point. An example of a block plot can be seen in the following screenshot:

After looking at the data from Sara's e-mail, there will be 17 data points on our chart. It is likely that some blocks will overlap others, and it may be hard to see some of the blocks. We will use the enhanced legend plugin, which will give us the ability to hide certain data series. So, for example, we can hide the TVs and Computers categories...