var legenddistance = {};
legenddistance['A320'] = 7757
legenddistance['A319'] = 2838
legenddistance['A330-300'] = 4162
legenddistance['E175'] = 1211
legenddistance['A321'] = 2762
legenddistance['737-800'] = 870
legenddistance['777-200ER'] = 6886
legenddistance['E190'] = 1059
legenddistance['777-300ER'] = 3443
legenddistance['A380-800'] = 3405
legenddistance['787-10'] = 3443
$(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: [
['A320',20.5],
['A319',7.5],
['A330-300',11],
['E175',3.2],
['A321',7.3],
['737-800',2.3],
['777-200ER',18.2],
['E190',2.8],
['777-300ER',9.1],
['A380-800',9],
['787-10',9.1]
]
}]
});
});
});