var legenddistance = {};
legenddistance['B777'] = 8522
legenddistance['B787'] = 25261
legenddistance['A320'] = 1471
legenddistance['A330'] = 2283
legenddistance['B757'] = 1116
legenddistance['A350'] = 4920
legenddistance['E175'] = 1217
legenddistance['A319'] = 304
legenddistance['A340'] = 5681
$(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: [
['B777',16.8],
['B787',49.8],
['A320',2.9],
['A330',4.5],
['B757',2.2],
['A350',9.7],
['E175',2.4],
['A319',0.6],
['A340',11.2]
]
}]
});
});
});