var legendsector = {};
legendsector['A319'] = 4
legendsector['747-400'] = 2
legendsector['777-300'] = 1
legendsector['Unspecified'] = 2
legendsector['E170'] = 1
legendsector['777-200'] = 2
legendsector['737-800'] = 4
legendsector['A330-200'] = 2
legendsector['A320'] = 5
legendsector['Dash 8-400Q'] = 3
legendsector['A321'] = 1
legendsector['737-900ER'] = 2
legendsector['A220-200'] = 3
$(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',12.5],
['747-400',6.2],
['777-300',3.1],
['Unspecified',6.2],
['E170',3.1],
['777-200',6.2],
['737-800',12.5],
['A330-200',6.2],
['A320',15.6],
['Dash 8-400Q',9.4],
['A321',3.1],
['737-900ER',6.2],
['A220-200',9.4]
]
}]
});
});
});