O'Reilly logo

Learning Highcharts by Joe Kuan

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

Plotting multiple pies in a chart – multiple series

With pie charts, we can do something more informative by displaying another pie chart side by side for the comparison of data. This can be done by simply specifying two series configurations in the series array.

We continue to use the previous example for the chart on the left-hand side and we create a new category series from the same dataset, but grouped by platforms this time. The following is the series configuration for doing so:

 series: [{ center: [ '25%', '50%' ], data: [ [ 'Nintendo', 54030288 ], [ 'Electronic Arts', 31367739 ], .... ] }, { center: [ '75%', '50%' ], dataLabels: { formatter: function() { var str = this.point.name + ': ' + Highcharts.numberFormat(this.percentage, 0) + ...

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