var legenddistance = {};
legenddistance['A339'] = 8237
legenddistance['A320'] = 19126
legenddistance['A321'] = 11587
legenddistance['A319'] = 977
legenddistance['A359'] = 25408
legenddistance['A332'] = 2932
legenddistance['B738'] = 3769
legenddistance['A223'] = 1256
legenddistance['E190'] = 2652
legenddistance['E195'] = 1256
legenddistance['B789'] = 21918
legenddistance['ATR72'] = 558
legenddistance['B77W'] = 7818
legenddistance['B772'] = 13542
legenddistance['B781'] = 3350
legenddistance['DQ400'] = 140
legenddistance['DH8'] = 698
legenddistance['B748'] = 11866
legenddistance['B73G'] = 2234
legenddistance['F50'] = 140
$(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: [
['A339',5.9],
['A320',13.7],
['A321',8.3],
['A319',0.7],
['A359',18.2],
['A332',2.1],
['B738',2.7],
['A223',0.9],
['E190',1.9],
['E195',0.9],
['B789',15.7],
['ATR72',0.4],
['B77W',5.6],
['B772',9.7],
['B781',2.4],
['DQ400',0.1],
['DH8',0.5],
['B748',8.5],
['B73G',1.6],
['F50',0.1]
]
}]
});
});
});