var legenddistance = {}; legenddistance['332'] = 52114 legenddistance['333'] = 28426 legenddistance['744'] = 298473 legenddistance['73H'] = 120811 legenddistance['734'] = 66327 legenddistance['777'] = 9475 legenddistance['763'] = 79356 legenddistance['MD80'] = 1184 legenddistance['757'] = 31979 legenddistance['773'] = 18951 legenddistance['Unspecified'] = 10660 legenddistance['738'] = 13029 legenddistance['733'] = 20135 legenddistance['320'] = 63959 legenddistance['5A'] = 4738 legenddistance['S80'] = 21320 legenddistance['322'] = 1184 legenddistance['ERJ'] = 2369 legenddistance['AB6'] = 0 legenddistance['S83'] = 2369 legenddistance['388'] = 168187 legenddistance['772'] = 11844 legenddistance['M83'] = 5922 legenddistance['737'] = 5922 legenddistance['BEH'] = 1184 legenddistance['DH3'] = 1184 legenddistance['M80'] = 2369 legenddistance['330'] = 2369 legenddistance['752'] = 23688 legenddistance['Q300'] = 1184 legenddistance['24D'] = 1184 legenddistance['CR7'] = 1184 legenddistance['ATR'] = 0 legenddistance['CR2'] = 0 legenddistance['321'] = 8291 legenddistance['73W'] = 2369 legenddistance['77W'] = 79356 legenddistance['AT7'] = 0 legenddistance['E70'] = 0 legenddistance['319'] = 1184 legenddistance['E190'] = 1184 legenddistance['E90'] = 2369 legenddistance['RJ9'] = 1184 legenddistance['CRJ'] = 1184 legenddistance['52'] = 1184 legenddistance['753'] = 2369 legenddistance['M88'] = 1184 legenddistance['346'] = 7107 $(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: [ ['332',4.4], ['333',2.4], ['744',25.2], ['73H',10.2], ['734',5.6], ['777',0.8], ['763',6.7], ['MD80',0.1], ['757',2.7], ['773',1.6], ['Unspecified',0.9], ['738',1.1], ['733',1.7], ['320',5.4], ['5A',0.4], ['S80',1.8], ['322',0.1], ['ERJ',0.2], ['AB6',0], ['S83',0.2], ['388',14.2], ['772',1], ['M83',0.5], ['737',0.5], ['BEH',0.1], ['DH3',0.1], ['M80',0.2], ['330',0.2], ['752',2], ['Q300',0.1], ['24D',0.1], ['CR7',0.1], ['ATR',0], ['CR2',0], ['321',0.7], ['73W',0.2], ['77W',6.7], ['AT7',0], ['E70',0], ['319',0.1], ['E190',0.1], ['E90',0.2], ['RJ9',0.1], ['CRJ',0.1], ['52',0.1], ['753',0.2], ['M88',0.1], ['346',0.6] ] }] }); }); });