-
Book Overview & Buying
-
Table Of Contents
Learning jqPlot
By :
We come to work on Thursday morning to find an e-mail from Sara waiting for us. "I liked the chart you did with some of our product categories," she says. "I'm sending over numbers for a few others and I'd like this chart to be broken out by months instead of quarters."
We start thinking through how to best represent this data. There are more data series, and the legend takes up space within the div element. This limits the space available to us for a vertical bar chart, so we decide on a horizontal bar chart. Horizontal bar charts are rotated 90 degrees; the x axis becomes the vertical axis, and the y axis is the horizontal axis. If any of our data series contain both x and y values, we will need to switch their order to [[y, x], [y, x], [y,x]].
We open the spreadsheet Sara sent over. There are nine product categories to plot, with 12 data points per category. That's 108 bars on our graph. Even using a horizontal chart, it may be a tight fit. We decide to move...
Change the font size
Change margin width
Change background colour