var legenddistance = {};
legenddistance['A319'] = 2655
legenddistance['A321'] = 531
legenddistance['A340-300'] = 17786
legenddistance['A330-300'] = 5442
legenddistance['B777-200'] = 7699
legenddistance['A320'] = 11017
legenddistance['A300-600'] = 664
legenddistance['B747-400'] = 18583
legenddistance['B777-300ER'] = 36369
legenddistance['ARJ-100'] = 265
legenddistance['F100'] = 265
legenddistance['B737-800'] = 4646
legenddistance['Unspecified'] = 664
legenddistance['Avro RJ100'] = 796
legenddistance['B737-400'] = 1726
legenddistance['ATR-72'] = 398
legenddistance['A340-600'] = 5177
legenddistance['B777'] = 531
legenddistance['B737-300'] = 398
legenddistance['B747 all series'] = 1858
legenddistance['Fokker 100'] = 265
legenddistance['B777-300'] = 1593
legenddistance['Fokker 70'] = 265
legenddistance['A340-500'] = 5044
legenddistance['A380-800'] = 6637
legenddistance['Bombadier Q400'] = 398
legenddistance['B767-300'] = 1327
$(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: [
['A319',2],
['A321',0.4],
['A340-300',13.4],
['A330-300',4.1],
['B777-200',5.8],
['A320',8.3],
['A300-600',0.5],
['B747-400',14],
['B777-300ER',27.4],
['ARJ-100',0.2],
['F100',0.2],
['B737-800',3.5],
['Unspecified',0.5],
['Avro RJ100',0.6],
['B737-400',1.3],
['ATR-72',0.3],
['A340-600',3.9],
['B777',0.4],
['B737-300',0.3],
['B747 all series',1.4],
['Fokker 100',0.2],
['B777-300',1.2],
['Fokker 70',0.2],
['A340-500',3.8],
['A380-800',5],
['Bombadier Q400',0.3],
['B767-300',1]
]
}]
});
});
});