var legenddistance = {};
legenddistance['777'] = 51826
legenddistance['332'] = 6999
legenddistance['380'] = 17664
legenddistance['767'] = 2666
legenddistance['737'] = 9832
legenddistance['ATR'] = 10332
legenddistance['Q300'] = 5166
legenddistance['Unspecified'] = 4999
legenddistance['333'] = 3666
legenddistance['772'] = 11665
legenddistance['346'] = 11498
legenddistance['A320'] = 4666
legenddistance['320'] = 1833
legenddistance['B1900D'] = 333
legenddistance['733'] = 1000
legenddistance['773'] = 22830
$(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: [
['777',31.1],
['332',4.2],
['380',10.6],
['767',1.6],
['737',5.9],
['ATR',6.2],
['Q300',3.1],
['Unspecified',3],
['333',2.2],
['772',7],
['346',6.9],
['A320',2.8],
['320',1.1],
['B1900D',0.2],
['733',0.6],
['773',13.7]
]
}]
});
});
});