var legenddistance = {};
legenddistance['A320'] = 17843
legenddistance['A319'] = 6556
legenddistance['E190'] = 4504
legenddistance['747-400'] = 20123
legenddistance['E175'] = 627
legenddistance['777-200'] = 3477
legenddistance['A321'] = 1767
legenddistance['E170'] = 2109
$(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: [
['A320',31.3],
['A319',11.5],
['E190',7.9],
['747-400',35.3],
['E175',1.1],
['777-200',6.1],
['A321',3.1],
['E170',3.7]
]
}]
});
});
});