var legenddistance = {};
legenddistance['320'] = 5490
legenddistance['321'] = 823
legenddistance['332'] = 13541
legenddistance['343'] = 3385
legenddistance['772'] = 8051
legenddistance['743'] = 2013
legenddistance['763'] = 5673
legenddistance['744'] = 24154
legenddistance['735'] = 732
legenddistance['734'] = 732
legenddistance['319'] = 2196
legenddistance['ER3'] = 183
legenddistance['752'] = 21592
legenddistance['Eurostar'] = 0
legenddistance['AR1'] = 2379
legenddistance['146'] = 274
legenddistance['EM2'] = 91
$(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: [
['320',6],
['321',0.9],
['332',14.8],
['343',3.7],
['772',8.8],
['743',2.2],
['763',6.2],
['744',26.4],
['735',0.8],
['734',0.8],
['319',2.4],
['ER3',0.2],
['752',23.6],
['Eurostar',0],
['AR1',2.6],
['146',0.3],
['EM2',0.1]
]
}]
});
});
});