var legenddistance = {}; legenddistance['TWIN OTTER'] = 561 legenddistance['Unspecified'] = 8579 legenddistance['A319'] = 21648 legenddistance['B737'] = 2085 legenddistance['E170'] = 1604 legenddistance['A320'] = 22770 legenddistance['B767'] = 2245 legenddistance['E190'] = 3848 legenddistance['A321'] = 4169 legenddistance['A320neo'] = 1684 legenddistance['ERJ-190'] = 160 legenddistance['A330'] = 1122 legenddistance['B737-8'] = 1523 legenddistance['A318'] = 3448 legenddistance['B747'] = 3448 legenddistance['A320 NEO'] = 321 legenddistance['A321NEO'] = 1042 $(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: [ ['TWIN OTTER',0.7], ['Unspecified',10.7], ['A319',27], ['B737',2.6], ['E170',2], ['A320',28.4], ['B767',2.8], ['E190',4.8], ['A321',5.2], ['A320neo',2.1], ['ERJ-190',0.2], ['A330',1.4], ['B737-8',1.9], ['A318',4.3], ['B747',4.3], ['A320 NEO',0.4], ['A321NEO',1.3] ] }] }); }); });