var legenddistance = {};
legenddistance['320'] = 10486
legenddistance['Unspecified'] = 6245
legenddistance['738'] = 6631
legenddistance['319'] = 3470
legenddistance['E70'] = 2082
legenddistance['146'] = 386
legenddistance['E90'] = 2930
legenddistance['748'] = 13493
legenddistance['380'] = 7479
legenddistance['767'] = 1465
legenddistance['737'] = 386
legenddistance['772ER'] = 11951
legenddistance['321'] = 2853
legenddistance['734'] = 231
legenddistance['318'] = 6939
$(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: [
['320',13.6],
['Unspecified',8.1],
['738',8.6],
['319',4.5],
['E70',2.7],
['146',0.5],
['E90',3.8],
['748',17.5],
['380',9.7],
['767',1.9],
['737',0.5],
['772ER',15.5],
['321',3.7],
['734',0.3],
['318',9]
]
}]
});
});
});