var legenddistance = {}; legenddistance['A350-900'] = 21746 legenddistance['B787-10'] = 10318 legenddistance['A320'] = 4571 legenddistance['A319'] = 653 legenddistance['B737-800'] = 1894 legenddistance['A321neo'] = 1763 legenddistance['B777-300ER'] = 12146 legenddistance['A330-300'] = 1567 legenddistance['B737-8'] = 4441 legenddistance['B787-9'] = 849 legenddistance['A380-800'] = 4898 legenddistance['ATR72-500'] = 392 $(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: [ ['A350-900',33.3], ['B787-10',15.8], ['A320',7], ['A319',1], ['B737-800',2.9], ['A321neo',2.7], ['B777-300ER',18.6], ['A330-300',2.4], ['B737-8',6.8], ['B787-9',1.3], ['A380-800',7.5], ['ATR72-500',0.6] ] }] }); }); });