var legendsector = {};
legendsector['A320'] = 6
legendsector['A321'] = 8
legendsector['A319'] = 3
legendsector['B772'] = 3
legendsector['B789'] = 3
legendsector['B38M'] = 2
legendsector['B39M'] = 1
legendsector['B77W'] = 3
legendsector['A35K'] = 2
legendsector['A332'] = 1
legendsector['A333'] = 1
legendsector['B738'] = 2
legendsector['B788'] = 1
legendsector['CRJ9'] = 1
legendsector['B739'] = 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: [
['A320',15.4],
['A321',20.5],
['A319',7.7],
['B772',7.7],
['B789',7.7],
['B38M',5.1],
['B39M',2.6],
['B77W',7.7],
['A35K',5.1],
['A332',2.6],
['A333',2.6],
['B738',5.1],
['B788',2.6],
['CRJ9',2.6],
['B739',5.1]
]
}]
});
});
});