var legenddistance = {};
legenddistance['380'] = 16845
legenddistance['320'] = 6916
legenddistance['E90'] = 1896
legenddistance['320neo'] = 1896
legenddistance['321LR'] = 11378
legenddistance['738'] = 5466
legenddistance['BUS'] = 223
legenddistance['321T'] = 2566
legenddistance['737MAX9'] = 1673
legenddistance['223'] = 2566
legenddistance['359'] = 2343
legenddistance['321'] = 1896
legenddistance['773'] = 9036
legenddistance['338'] = 2789
legenddistance['339'] = 1562
legenddistance['333'] = 5912
legenddistance['7810'] = 2566
legenddistance['359ULR'] = 9482
legenddistance['789'] = 7809
legenddistance['772'] = 1896
legenddistance['739'] = 2008
legenddistance['CRJ900'] = 1004
legenddistance['788'] = 5689
legenddistance['E75'] = 1339
legenddistance['744'] = 781
legenddistance['77W'] = 1673
legenddistance['350'] = 892
legenddistance['332'] = 223
legenddistance['CRJ550'] = 446
legenddistance['E70'] = 892
$(function () {
var chart;
$(document).ready(function() {
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'aircraft_distance',
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 +' % (' + legenddistance[this.point.name].toLocaleString() + ')';
}
}
}
},
series: [{
type: 'pie',
name: 'Sectors by Aircraft',
data: [
['380',15.1],
['320',6.2],
['E90',1.7],
['320neo',1.7],
['321LR',10.2],
['738',4.9],
['BUS',0.2],
['321T',2.3],
['737MAX9',1.5],
['223',2.3],
['359',2.1],
['321',1.7],
['773',8.1],
['338',2.5],
['339',1.4],
['333',5.3],
['7810',2.3],
['359ULR',8.5],
['789',7],
['772',1.7],
['739',1.8],
['CRJ900',0.9],
['788',5.1],
['E75',1.2],
['744',0.7],
['77W',1.5],
['350',0.8],
['332',0.2],
['CRJ550',0.4],
['E70',0.8]
]
}]
});
});
});