var legenddistance = {};
legenddistance['Unspecified'] = 178224
legenddistance['777'] = 72055
legenddistance['airbus'] = 2785
legenddistance['A320'] = 16012
legenddistance['A380'] = 24715
legenddistance['767'] = 5570
legenddistance['737'] = 5570
legenddistance['A319'] = 2089
legenddistance['747'] = 26803
legenddistance['Dash 8'] = 2437
legenddistance['A321'] = 5918
legenddistance['ATR 72-600'] = 0
legenddistance['B777'] = 5918
$(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',51.2],
['777',20.7],
['airbus',0.8],
['A320',4.6],
['A380',7.1],
['767',1.6],
['737',1.6],
['A319',0.6],
['747',7.7],
['Dash 8',0.7],
['A321',1.7],
['ATR 72-600',0],
['B777',1.7]
]
}]
});
});
});