var legendsector = {};
legendsector['A321'] = 10
legendsector['Saab 2000'] = 7
legendsector['A329'] = 1
legendsector['A320'] = 17
legendsector['A319'] = 13
legendsector['A380-800'] = 1
legendsector['777-300ER'] = 2
legendsector['E190'] = 6
legendsector['01A'] = 1
legendsector['Saab 340'] = 1
legendsector['E170'] = 2
legendsector['787-8'] = 1
legendsector['Dash-8'] = 1
legendsector['E175'] = 1
legendsector['747-400'] = 1
legendsector['11D'] = 1
legendsector['A350-900'] = 2
$(function () {
var chart;
$(document).ready(function() {
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'aircraft_sector',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: ''
},
tooltip: {
pointFormat: '{series.name}: {point.percentage}%',
percentageDecimals: 1
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#000000',
connectorColor: '#000000',
formatter: function() {
return ''+ this.point.name +': '+ Math.round(this.percentage*10)/10 +' % (' + legendsector[this.point.name].toLocaleString() + ')';
}
}
}
},
series: [{
type: 'pie',
name: 'Sectors by Aircraft',
data: [
['A321',14.7],
['Saab 2000',10.3],
['A329',1.5],
['A320',25],
['A319',19.1],
['A380-800',1.5],
['777-300ER',2.9],
['E190',8.8],
['01A',1.5],
['Saab 340',1.5],
['E170',2.9],
['787-8',1.5],
['Dash-8',1.5],
['E175',1.5],
['747-400',1.5],
['11D',1.5],
['A350-900',2.9]
]
}]
});
});
});