var legenddistance = {}; legenddistance['Q400'] = 4624 legenddistance['Unspecified'] = 41342 legenddistance['B777'] = 14143 legenddistance['E* BR373'] = 544 legenddistance['A320'] = 14959 legenddistance['A330'] = 21759 legenddistance['A340'] = 16863 legenddistance['B737'] = 7344 legenddistance['B738'] = 22303 legenddistance['0'] = 12239 legenddistance['B77W'] = 26655 legenddistance['A319'] = 3808 legenddistance['B757'] = 4080 legenddistance['ERJ-170'] = 272 legenddistance['B747'] = 9791 legenddistance['CS100'] = 816 legenddistance['A321'] = 5984 legenddistance['E* e320'] = 544 legenddistance['A343'] = 6800 legenddistance['A388'] = 5984 legenddistance['B789'] = 1632 legenddistance['B733'] = 544 legenddistance['A220'] = 816 legenddistance['A321N'] = 6800 legenddistance['A322'] = 2448 legenddistance['A320N'] = 1904 legenddistance['B7382'] = 2448 legenddistance['B772'] = 11695 legenddistance['B773'] = 19311 legenddistance['A322N'] = 816 legenddistance['B38M'] = 2992 $(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: [ ['Q400',1.7], ['Unspecified',15.2], ['B777',5.2], ['E* BR373',0.2], ['A320',5.5], ['A330',8], ['A340',6.2], ['B737',2.7], ['B738',8.2], ['0',4.5], ['B77W',9.8], ['A319',1.4], ['B757',1.5], ['ERJ-170',0.1], ['B747',3.6], ['CS100',0.3], ['A321',2.2], ['E* e320',0.2], ['A343',2.5], ['A388',2.2], ['B789',0.6], ['B733',0.2], ['A220',0.3], ['A321N',2.5], ['A322',0.9], ['A320N',0.7], ['B7382',0.9], ['B772',4.3], ['B773',7.1], ['A322N',0.3], ['B38M',1.1] ] }] }); }); });