var legenddistance = {};
legenddistance['B747'] = 92067
legenddistance['B737'] = 4670
legenddistance['Unspecified'] = 193474
legenddistance['B777'] = 7005
legenddistance['CRJ'] = 667
legenddistance['A330'] = 7339
legenddistance['34C'] = 6004
legenddistance['319'] = 2335
legenddistance['Concorde'] = 3336
legenddistance['744'] = 3336
legenddistance['B767'] = 3002
legenddistance['A340'] = 7005
legenddistance['A321'] = 1668
legenddistance['A320'] = 1001
$(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: [
['B747',27.6],
['B737',1.4],
['Unspecified',58],
['B777',2.1],
['CRJ',0.2],
['A330',2.2],
['34C',1.8],
['319',0.7],
['Concorde',1],
['744',1],
['B767',0.9],
['A340',2.1],
['A321',0.5],
['A320',0.3]
]
}]
});
});
});