var legenddistance = {};
legenddistance['Unspecified'] = 325099
legenddistance['777'] = 90913
legenddistance['757'] = 14960
legenddistance['747-400'] = 27619
legenddistance['737-300'] = 1151
legenddistance['A319'] = 1726
legenddistance['A330'] = 6329
legenddistance['A320'] = 1151
legenddistance['A321'] = 3452
legenddistance['747'] = 89187
legenddistance['Avroliner RJ100 '] = 1151
legenddistance['TBC'] = 575
legenddistance['A380'] = 12083
$(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',56.5],
['777',15.8],
['757',2.6],
['747-400',4.8],
['737-300',0.2],
['A319',0.3],
['A330',1.1],
['A320',0.2],
['A321',0.6],
['747',15.5],
['Avroliner RJ100 ',0.2],
['TBC',0.1],
['A380',2.1]
]
}]
});
});
});