var legenddistance = {};
legenddistance['74H'] = 1311
legenddistance['388'] = 23041
legenddistance['E75'] = 11052
legenddistance['32B'] = 24727
legenddistance['CRJ'] = 749
legenddistance['321'] = 4870
legenddistance['M80'] = 2997
legenddistance['738'] = 16484
legenddistance['739'] = 8242
legenddistance['320'] = 9179
legenddistance['G-IV'] = 2435
legenddistance['789'] = 7118
legenddistance['752i'] = 1499
legenddistance['772'] = 3934
legenddistance['319'] = 7306
legenddistance['77W'] = 31470
legenddistance['ER4'] = 562
legenddistance['763'] = 2623
legenddistance['764'] = 9928
legenddistance['CR7'] = 375
legenddistance['753'] = 1686
legenddistance['AR8'] = 562
legenddistance['752'] = 3184
legenddistance['346'] = 11989
$(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: [
['74H',0.7],
['388',12.3],
['E75',5.9],
['32B',13.2],
['CRJ',0.4],
['321',2.6],
['M80',1.6],
['738',8.8],
['739',4.4],
['320',4.9],
['G-IV',1.3],
['789',3.8],
['752i',0.8],
['772',2.1],
['319',3.9],
['77W',16.8],
['ER4',0.3],
['763',1.4],
['764',5.3],
['CR7',0.2],
['753',0.9],
['AR8',0.3],
['752',1.7],
['346',6.4]
]
}]
});
});
});