var legenddistance = {};
legenddistance['320'] = 328
legenddistance['HB-IPT 319'] = 304
legenddistance['HB-JHG A333'] = 3923
legenddistance['OO-SFU A332'] = 3660
$(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',4],
['HB-IPT 319',3.7],
['HB-JHG A333',47.8],
['OO-SFU A332',44.6]
]
}]
});
});
});