var legendsector = {};
legendsector['A319'] = 27
legendsector['A320'] = 18
legendsector['B737'] = 1
legendsector['E170'] = 2
legendsector['Twin Otter'] = 2
legendsector['B767'] = 4
legendsector['E190'] = 5
legendsector['A321'] = 2
$(function () {
var chart;
$(document).ready(function() {
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'aircraft_sector',
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 +' % (' + legendsector[this.point.name].toLocaleString() + ')';
}
}
}
},
series: [{
type: 'pie',
name: 'Sectors by Aircraft',
data: [
['A319',44.3],
['A320',29.5],
['B737',1.6],
['E170',3.3],
['Twin Otter',3.3],
['B767',6.6],
['E190',8.2],
['A321',3.3]
]
}]
});
});
});