O'Reilly logo

Learning jqPlot by Scott Gottreu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5, Pie Charts and Donut Charts

  1. We passed an array of color values to seriesColors to override the default colors in jqPlot.
  2. We can set dataLabelNudge under rendererOptions for a series to move the labels further from the center of the pie.
  3. If we do not set a value for dataLabels, the label will default to showing the percentage of the wedge. The other two options are label, which is the value passed in as the x value, and value, which is the number passed in as the y value.
  4. We set numberRows to 1 under rendererOptions for our legend.
  5. If there are a lot of small wedges, it will be hard to tell what category they belong to or compare them to other categories. Also, you cannot determine trends from a pie chart.
  6. When a user clicks on a wedge showing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required