var legenddistance = {};
legenddistance['Unspecified'] = 78683
legenddistance['A320'] = 21732
legenddistance['A319'] = 17610
legenddistance['B777'] = 45711
legenddistance['B747'] = 108283
legenddistance['A321'] = 5620
legenddistance['B737'] = 8618
legenddistance['B767'] = 1499
legenddistance['E170'] = 0
legenddistance['B738'] = 1873
legenddistance['B772'] = 11990
legenddistance['A330'] = 22106
legenddistance['MD83'] = 1499
legenddistance['A340'] = 18734
legenddistance['MD80'] = 3372
legenddistance['F100'] = 375
legenddistance['A20'] = 375
legenddistance['777'] = 26602
$(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',21],
['A320',5.8],
['A319',4.7],
['B777',12.2],
['B747',28.9],
['A321',1.5],
['B737',2.3],
['B767',0.4],
['E170',0],
['B738',0.5],
['B772',3.2],
['A330',5.9],
['MD83',0.4],
['A340',5],
['MD80',0.9],
['F100',0.1],
['A20',0.1],
['777',7.1]
]
}]
});
});
});