var legenddistance = {}; legenddistance['Unspecified'] = 182659 legenddistance['747-400'] = 18034 legenddistance['777-300'] = 2319 legenddistance['744'] = 34522 legenddistance['773'] = 515 legenddistance['340-600'] = 5925 legenddistance['320'] = 1288 legenddistance['A340'] = 11078 legenddistance['A321'] = 515 legenddistance['A333'] = 258 legenddistance['A300'] = 258 $(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: [ ['Unspecified',70.9], ['747-400',7], ['777-300',0.9], ['744',13.4], ['773',0.2], ['340-600',2.3], ['320',0.5], ['A340',4.3], ['A321',0.2], ['A333',0.1], ['A300',0.1] ] }] }); }); });