var legenddistance = {};
legenddistance['Unspecified'] = 614312
legenddistance['A380'] = 166076
legenddistance['767'] = 847
legenddistance['787-9'] = 24572
legenddistance['A380 Emirates'] = 37282
legenddistance['A350-900'] = 847
legenddistance['787-10'] = 4237
$(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: [
['Unspecified',72.5],
['A380',19.6],
['767',0.1],
['787-9',2.9],
['A380 Emirates',4.4],
['A350-900',0.1],
['787-10',0.5]
]
}]
});
});
});