var legenddistance = {}; legenddistance['Q300'] = 12992 legenddistance['Unspecified'] = 40073 legenddistance['767'] = 9332 legenddistance['A320'] = 12443 legenddistance['737'] = 53064 legenddistance['1900D'] = 1098 legenddistance['Jetstream 32'] = 183 legenddistance['ATR72'] = 183 legenddistance['747'] = 6587 legenddistance['E190'] = 2196 legenddistance['777-200'] = 23238 legenddistance['ATR'] = 3477 legenddistance['B1900'] = 549 legenddistance['777-300'] = 3294 legenddistance['777'] = 14089 legenddistance['717'] = 183 $(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: [ ['Q300',7.1], ['Unspecified',21.9], ['767',5.1], ['A320',6.8], ['737',29], ['1900D',0.6], ['Jetstream 32',0.1], ['ATR72',0.1], ['747',3.6], ['E190',1.2], ['777-200',12.7], ['ATR',1.9], ['B1900',0.3], ['777-300',1.8], ['777',7.7], ['717',0.1] ] }] }); }); });