var legenddistance = {}; legenddistance['Airbus A320-232'] = 54983 legenddistance['Airbus A320-251N'] = 26978 legenddistance['Airbus A319-131'] = 5139 legenddistance['Airbus A320-232 '] = 1799 legenddistance['Airbus A321-251NX'] = 5909 legenddistance['Unspecified'] = 88127 legenddistance['Airbus A220-300'] = 2312 legenddistance['Embraer E190'] = 1028 legenddistance['Boeing 777-236'] = 6937 legenddistance['Airbus A320-214'] = 6423 legenddistance['Embraer E170'] = 514 legenddistance['Embraer E190STD'] = 1028 legenddistance['Embraer E195-E2'] = 771 legenddistance['ATR 72-600'] = 771 legenddistance['Mitsubishi CRJ-900LR'] = 1542 legenddistance['Airbus A319-112'] = 771 legenddistance['Airbus A319-114'] = 771 legenddistance['Embraer E190SR'] = 257 legenddistance['Boeing 737-8K2'] = 2826 legenddistance['Embraer E175STD'] = 1542 legenddistance['Boeing 737-8AS'] = 2569 legenddistance['Boeing 787-10 Dreamliner'] = 6680 legenddistance['Boeing 777-36N'] = 3597 legenddistance['Embraer E170STD'] = 514 legenddistance['Boeing 737-78J'] = 257 legenddistance['Airbus A319-111'] = 2312 legenddistance['Airbus A321-231'] = 7451 legenddistance['Airbus A350-1041'] = 7194 legenddistance['Airbus A320-271N'] = 514 legenddistance['Embraer E190LR'] = 257 legenddistance['Mitsubishi CRJ-1000EL'] = 1028 legenddistance['Embraer E195LR'] = 257 legenddistance['Boeing 737-8MG'] = 1285 legenddistance['Boeing 737 MAX 8'] = 1285 legenddistance['Airbus A320-23'] = 1285 legenddistance['Airbus A380-841'] = 3340 legenddistance['Embraer E175LR'] = 514 legenddistance['Boeing 777-300 ER'] = 3340 legenddistance['Airbus A330-302'] = 771 legenddistance['Boeing 787-9 Dreamliner'] = 2826 $(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: [ ['Airbus A320-232',21.4], ['Airbus A320-251N',10.5], ['Airbus A319-131',2], ['Airbus A320-232 ',0.7], ['Airbus A321-251NX',2.3], ['Unspecified',34.3], ['Airbus A220-300',0.9], ['Embraer E190',0.4], ['Boeing 777-236',2.7], ['Airbus A320-214',2.5], ['Embraer E170',0.2], ['Embraer E190STD',0.4], ['Embraer E195-E2',0.3], ['ATR 72-600',0.3], ['Mitsubishi CRJ-900LR',0.6], ['Airbus A319-112',0.3], ['Airbus A319-114',0.3], ['Embraer E190SR',0.1], ['Boeing 737-8K2',1.1], ['Embraer E175STD',0.6], ['Boeing 737-8AS',1], ['Boeing 787-10 Dreamliner',2.6], ['Boeing 777-36N',1.4], ['Embraer E170STD',0.2], ['Boeing 737-78J',0.1], ['Airbus A319-111',0.9], ['Airbus A321-231',2.9], ['Airbus A350-1041',2.8], ['Airbus A320-271N',0.2], ['Embraer E190LR',0.1], ['Mitsubishi CRJ-1000EL',0.4], ['Embraer E195LR',0.1], ['Boeing 737-8MG',0.5], ['Boeing 737 MAX 8',0.5], ['Airbus A320-23',0.5], ['Airbus A380-841',1.3], ['Embraer E175LR',0.2], ['Boeing 777-300 ER',1.3], ['Airbus A330-302',0.3], ['Boeing 787-9 Dreamliner',1.1] ] }] }); }); });