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 3, Bar Charts and Digging into Data


  1. If we wish to enable labels for all our series under seriesDefaults, we will add the pointLabels: { show: true } property. If we only want to do this for one series, we will find that element in our series array and set show to true under pointsLabels.

  2. To rotate your tick labels, you will need to enable canvasAxisTickRenderer in your plot. This plugin is dependent on canvasTextRenderer, so you will need to include this file as well.

  3. By setting shadowAlpha close to 1.0, the shadow on the bar will appear more like the side of the bar than a shadow. This gives the bar a three-dimensional look.

  4. By using a trend line, we demonstrated that revenue for a particular category was increasing or decreasing over time.

  5. We bound an event to jqplotDataHighlight so that more data appeared when a user hovered over an area. When a user moved away from that area, we bound an event to jqplotDataUnhighlight to make the data disappear.

  6. There are two ways. First, we can break up each regional amount and group it by return reason. So, we will have four bars corresponding to each region for Damaged Item, and so on. The other way is to group the six reasons under each region. So, we will have a bar for Damaged Item through Other | No Reason Given under Southwest, and so on.

  7. Knowing what products were returned can be helpful. If one brand of TV accounted for 75 percent of the Defective Item or Damaged Item categories, it will be very useful. If you have data showing a small group of employees were the ones giving out most of the returns, action can be taken.