var legenddistance = {};
legenddistance['763'] = 45038
legenddistance['320'] = 56298
legenddistance['744'] = 414558
legenddistance['772'] = 131021
legenddistance['319'] = 58345
legenddistance['321'] = 17401
legenddistance['752'] = 44015
legenddistance['733'] = 6142
legenddistance['AR8'] = 1024
legenddistance['737'] = 1024
legenddistance['738'] = 16378
legenddistance['734'] = 15354
legenddistance['762'] = 0
legenddistance['AR1'] = 4094
legenddistance['732'] = 2047
legenddistance['743'] = 5118
legenddistance['333'] = 18425
legenddistance['306'] = 0
legenddistance['773'] = 9212
legenddistance['735'] = 2047
legenddistance['343'] = 9212
legenddistance['332'] = 16378
legenddistance['Eurostar'] = 0
legenddistance['ER3'] = 0
legenddistance['146'] = 0
legenddistance['EM2'] = 0
legenddistance['CRJ'] = 0
legenddistance['346'] = 16378
legenddistance['388'] = 54251
legenddistance['712'] = 1024
legenddistance['342'] = 11260
legenddistance['E70'] = 1024
legenddistance['E90'] = 0
legenddistance['77W'] = 28661
legenddistance['318'] = 3071
legenddistance['CR7'] = 1024
legenddistance['789'] = 4094
legenddistance['359'] = 6142
legenddistance['788'] = 8189
legenddistance['20N'] = 9212
legenddistance['38M'] = 1024
$(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: [
['763',4.4],
['320',5.5],
['744',40.5],
['772',12.8],
['319',5.7],
['321',1.7],
['752',4.3],
['733',0.6],
['AR8',0.1],
['737',0.1],
['738',1.6],
['734',1.5],
['762',0],
['AR1',0.4],
['732',0.2],
['743',0.5],
['333',1.8],
['306',0],
['773',0.9],
['735',0.2],
['343',0.9],
['332',1.6],
['Eurostar',0],
['ER3',0],
['146',0],
['EM2',0],
['CRJ',0],
['346',1.6],
['388',5.3],
['712',0.1],
['342',1.1],
['E70',0.1],
['E90',0],
['77W',2.8],
['318',0.3],
['CR7',0.1],
['789',0.4],
['359',0.6],
['788',0.8],
['20N',0.9],
['38M',0.1]
]
}]
});
});
});