var legendsector = {};
legendsector['A350-900'] = 5
legendsector['B787-10'] = 8
legendsector['A320'] = 6
legendsector['A319'] = 1
legendsector['B737-800'] = 4
legendsector['A321neo'] = 3
legendsector['B777-300ER'] = 2
legendsector['A330-300'] = 1
legendsector['B737-8'] = 4
legendsector['B787-9'] = 1
legendsector['A380-800'] = 2
legendsector['ATR72-500'] = 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: [
['A350-900',12.8],
['B787-10',20.5],
['A320',15.4],
['A319',2.6],
['B737-800',10.3],
['A321neo',7.7],
['B777-300ER',5.1],
['A330-300',2.6],
['B737-8',10.3],
['B787-9',2.6],
['A380-800',5.1],
['ATR72-500',5.1]
]
}]
});
});
});