var legendsector = {};
legendsector['A 320'] = 13
legendsector['A 321'] = 5
legendsector['A 220'] = 3
legendsector['Embraer 195'] = 3
legendsector['A 319'] = 4
legendsector['Embraer 190'] = 4
legendsector['321'] = 1
legendsector['A 330-900'] = 2
legendsector['Embraer 175'] = 1
legendsector['A 350'] = 2
legendsector['777'] = 1
legendsector['A 330'] = 2
legendsector['A 340-300'] = 1
legendsector['737'] = 1
$(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: [
['A 320',30.2],
['A 321',11.6],
['A 220',7],
['Embraer 195',7],
['A 319',9.3],
['Embraer 190',9.3],
['321',2.3],
['A 330-900',4.7],
['Embraer 175',2.3],
['A 350',4.7],
['777',2.3],
['A 330',4.7],
['A 340-300',2.3],
['737',2.3]
]
}]
});
});
});