var legenddistance = {}; legenddistance['777'] = 32150 legenddistance['Unspecified'] = 236711 legenddistance['744'] = 4593 legenddistance['747-400'] = 35683 legenddistance['A319'] = 353 legenddistance['A346'] = 10952 legenddistance['767'] = 353 legenddistance['757'] = 2120 legenddistance['A320'] = 0 legenddistance['737'] = 353 legenddistance['777-200'] = 16958 legenddistance['319'] = 707 legenddistance['320'] = 2120 legenddistance['747'] = 6713 legenddistance['787-9'] = 3533 $(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: [ ['777',9.1], ['Unspecified',67], ['744',1.3], ['747-400',10.1], ['A319',0.1], ['A346',3.1], ['767',0.1], ['757',0.6], ['A320',0], ['737',0.1], ['777-200',4.8], ['319',0.2], ['320',0.6], ['747',1.9], ['787-9',1] ] }] }); }); });