Multiple pies
by kzoon
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function() {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Browser market shares at a specific website, 2010'
},
tooltip: {
formatter: function() {
return '<b>' + this.point.name + '</b>: ' + this.percentage + ' %';
}
},
legend: {
// verticalAlign: 'middle',
// align: 'right',
// layout: 'vertical',
enabled: true
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
size: '35%',
dataLabels: {
enabled: false
}
}
},
series: [{
type: 'pie',
name: 'testname1',
center: ['30%', '30%'],
showInLegend: true,
data: [
['Commerce', 33.0],
['Engineering', 32.3],
{
name: 'Financial Services',
y: 18.8},
['Logistics, Aviation & Shipping', 5.5],
['Seafood & Marine', 9.2],
['Test', 0],
['Corporate Services & others', 1.2]
]},
{
type: 'pie',
name: 'testname2',
center: ['80%', '30%'],
showInLegend: false,
data: [
['Commerce', 33.0],
['Engineering', 32.3],
{
name: 'Financial Services',
...