var legendsector = {}; legendsector['B747'] = 16 legendsector['B737'] = 8 legendsector['Unspecified'] = 85 legendsector['B777'] = 3 legendsector['CRJ'] = 2 legendsector['A330'] = 5 legendsector['34C'] = 1 legendsector['319'] = 4 legendsector['Concorde'] = 1 legendsector['744'] = 1 legendsector['B767'] = 3 legendsector['A340'] = 1 legendsector['A321'] = 2 legendsector['A320'] = 1 $(function () { var chart; $(document).ready(function() { // Build the chart chart = new Highcharts.Chart({ chart: { renderTo: 'aircraft_sector', 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 +' % (' + legendsector[this.point.name].toLocaleString() + ')'; } } } }, series: [{ type: 'pie', name: 'Sectors by Aircraft', data: [ ['B747',12], ['B737',6], ['Unspecified',63.9], ['B777',2.3], ['CRJ',1.5], ['A330',3.8], ['34C',0.8], ['319',3], ['Concorde',0.8], ['744',0.8], ['B767',2.3], ['A340',0.8], ['A321',1.5], ['A320',0.8] ] }] }); }); });