var legenddistance = {};
legenddistance['777-200'] = 35801
legenddistance['ERJ-140'] = 711
legenddistance['777-300'] = 3556
legenddistance['747-400'] = 86538
legenddistance['A320-200'] = 22761
legenddistance['A321-200'] = 12329
legenddistance['A319-100'] = 13514
legenddistance['CRJ-700'] = 474
legenddistance['737-800'] = 4505
legenddistance['767-300'] = 10195
legenddistance['737-400'] = 7113
legenddistance['A340-600'] = 711
legenddistance['757-200'] = 10432
legenddistance['737-300'] = 711
legenddistance['A330-200'] = 9009
legenddistance['A380-800'] = 5690
legenddistance['ERJ-145'] = 711
legenddistance['A340-300'] = 711
legenddistance['A320neo'] = 2371
legenddistance['A350-1000'] = 1660
legenddistance['777-236ER'] = 6876
legenddistance['E175'] = 711
$(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: [
['777-200',15.1],
['ERJ-140',0.3],
['777-300',1.5],
['747-400',36.5],
['A320-200',9.6],
['A321-200',5.2],
['A319-100',5.7],
['CRJ-700',0.2],
['737-800',1.9],
['767-300',4.3],
['737-400',3],
['A340-600',0.3],
['757-200',4.4],
['737-300',0.3],
['A330-200',3.8],
['A380-800',2.4],
['ERJ-145',0.3],
['A340-300',0.3],
['A320neo',1],
['A350-1000',0.7],
['777-236ER',2.9],
['E175',0.3]
]
}]
});
});
});