var legenddistance = {};
legenddistance['A320'] = 27241
legenddistance['A319'] = 24970
legenddistance['A340-600'] = 62048
legenddistance['737-800'] = 10089
legenddistance['777-300ER'] = 7062
legenddistance['Unspecified'] = 5045
legenddistance['A321'] = 6558
legenddistance['MD-82'] = 1766
legenddistance['737-500'] = 1766
legenddistance['MD80'] = 1009
legenddistance['757'] = 2522
legenddistance['Avro RJ100'] = 252
legenddistance['737-600'] = 1766
legenddistance['ERJ-145'] = 2522
legenddistance['Dash 8'] = 3027
legenddistance['ERJ-195'] = 252
legenddistance['747-400'] = 14125
legenddistance['ERJ-135'] = 504
legenddistance['757-200'] = 1766
legenddistance['737-300'] = 1766
legenddistance['767'] = 4288
legenddistance['747'] = 20935
legenddistance['777'] = 48932
legenddistance['E195'] = 252
legenddistance['737'] = 1766
legenddistance['E170'] = 252
$(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',10.8],
['A319',9.9],
['A340-600',24.6],
['737-800',4],
['777-300ER',2.8],
['Unspecified',2],
['A321',2.6],
['MD-82',0.7],
['737-500',0.7],
['MD80',0.4],
['757',1],
['Avro RJ100',0.1],
['737-600',0.7],
['ERJ-145',1],
['Dash 8',1.2],
['ERJ-195',0.1],
['747-400',5.6],
['ERJ-135',0.2],
['757-200',0.7],
['737-300',0.7],
['767',1.7],
['747',8.3],
['777',19.4],
['E195',0.1],
['737',0.7],
['E170',0.1]
]
}]
});
});
});