var legenddistance = {}; legenddistance['Boeing 737'] = 5260 legenddistance['Airbus 319'] = 2630 legenddistance['Embraer 145'] = 2630 legenddistance['Fokker 100'] = 1052 legenddistance['Avro RJ-85'] = 526 legenddistance['Airbus 320'] = 2630 legenddistance['Embraer 135'] = 1052 legenddistance['Dornier 328'] = 526 legenddistance['Boeing 767-400'] = 9468 legenddistance['Boeing 757'] = 2630 legenddistance['Unspecified'] = 451852 legenddistance['A-320'] = 1052 legenddistance['Boeing 777-300'] = 5786 legenddistance['Airbus 321'] = 2630 legenddistance['Dash 8Q-400'] = 526 legenddistance['Embraer 170'] = 1052 legenddistance['Airbus 330'] = 8416 legenddistance['Embraer 190'] = 1052 legenddistance['Airbus 340-600'] = 4734 legenddistance['Airbus A380-800'] = 11572 legenddistance['Pilatus PC-12'] = 4208 legenddistance['B717'] = 2104 legenddistance['B787'] = 2630 legenddistance['CJ3'] = 0 $(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: [ ['Boeing 737',1], ['Airbus 319',0.5], ['Embraer 145',0.5], ['Fokker 100',0.2], ['Avro RJ-85',0.1], ['Airbus 320',0.5], ['Embraer 135',0.2], ['Dornier 328',0.1], ['Boeing 767-400',1.8], ['Boeing 757',0.5], ['Unspecified',85.9], ['A-320',0.2], ['Boeing 777-300',1.1], ['Airbus 321',0.5], ['Dash 8Q-400',0.1], ['Embraer 170',0.2], ['Airbus 330',1.6], ['Embraer 190',0.2], ['Airbus 340-600',0.9], ['Airbus A380-800',2.2], ['Pilatus PC-12',0.8], ['B717',0.4], ['B787',0.5], ['CJ3',0] ] }] }); }); });