var legenddistance = {}; legenddistance['B777'] = 6986 legenddistance['A380'] = 31689 legenddistance['B737'] = 9981 legenddistance['TYPE'] = 998 legenddistance['Fokker'] = 998 legenddistance['DH8'] = 2162 legenddistance['Unspecified'] = 416 legenddistance['A320'] = 1996 legenddistance['A350'] = 17965 legenddistance['FOKKER 70'] = 416 legenddistance['SAAB340'] = 1913 legenddistance['A330'] = 7652 $(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: [ ['B777',8.4], ['A380',38.1], ['B737',12], ['TYPE',1.2], ['Fokker',1.2], ['DH8',2.6], ['Unspecified',0.5], ['A320',2.4], ['A350',21.6], ['FOKKER 70',0.5], ['SAAB340',2.3], ['A330',9.2] ] }] }); }); });