var legenddistance = {}; legenddistance['737-800'] = 17890 legenddistance['A320'] = 37371 legenddistance['A321'] = 11132 legenddistance['EMB170'] = 398 legenddistance['A319'] = 32070 legenddistance['ERJ-145'] = 928 legenddistance['767-300'] = 5963 legenddistance['737-300'] = 265 legenddistance['CRJ-100'] = 398 legenddistance['737-400'] = 1060 legenddistance['MD-83'] = 133 legenddistance['EMB190'] = 2915 legenddistance['A380'] = 10204 legenddistance['F100'] = 928 legenddistance['777-300ER'] = 10867 $(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: [ ['737-800',13.5], ['A320',28.2], ['A321',8.4], ['EMB170',0.3], ['A319',24.2], ['ERJ-145',0.7], ['767-300',4.5], ['737-300',0.2], ['CRJ-100',0.3], ['737-400',0.8], ['MD-83',0.1], ['EMB190',2.2], ['A380',7.7], ['F100',0.7], ['777-300ER',8.2] ] }] }); }); });