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

Chapter 4, Horizontal and Stacked Bar Charts


  1. We need to switch their order from [[x, y], [x, y], [x, y]] to [[y, x], [y, x], [y, x]].

  2. We use the canvasOverlay option to create a horizontal or vertical line. Within this property, we must set show to true and create an objects array that holds the options for each line we will create.

  3. Under tickOptions, set showGridline to false for the axis you want to remove grid lines from. If you want to remove both the grid lines and the ticks, you can set show to false under tickOptions.

  4. Within the series array, you will need to create a property called pointLabels. Within this object, you pass an array to the label property. It is expected that there will be a label for each data point in the series.

  5. There are two main limitations of both charts. If there are too many data points and we keep the chart at a manageable size, the bars will be too small to see. If we increase the size of the chart to accommodate all the bars, the user will have to scroll back and forth, and this will make data comparison difficult.