var legenddistance = {}; legenddistance['Aerospatiale/Alenia ATR 72'] = 0 legenddistance['Boeing 777-200/200ER'] = 10847 legenddistance['Fokker 100'] = 1550 legenddistance['Airbus A320-100/200'] = 775 legenddistance['777-300ER'] = 13171 legenddistance['330'] = 10847 legenddistance['747'] = 28666 legenddistance['737'] = 775 legenddistance['Unspecified'] = 680241 legenddistance['777-200'] = 5423 legenddistance['777-300'] = 3099 legenddistance['757'] = 4649 legenddistance['737-900'] = 1550 legenddistance['ATR'] = 0 legenddistance['777'] = 11621 $(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: [ ['Aerospatiale/Alenia ATR 72',0], ['Boeing 777-200/200ER',1.4], ['Fokker 100',0.2], ['Airbus A320-100/200',0.1], ['777-300ER',1.7], ['330',1.4], ['747',3.7], ['737',0.1], ['Unspecified',87.8], ['777-200',0.7], ['777-300',0.4], ['757',0.6], ['737-900',0.2], ['ATR',0], ['777',1.5] ] }] }); }); });