var legendsector = {}; legendsector['A319'] = 4 legendsector['747-400'] = 2 legendsector['777-300'] = 1 legendsector['Unspecified'] = 2 legendsector['E170'] = 1 legendsector['777-200'] = 2 legendsector['737-800'] = 4 legendsector['A330-200'] = 2 legendsector['A320'] = 5 legendsector['Dash 8-400Q'] = 3 legendsector['A321'] = 1 legendsector['737-900ER'] = 2 $(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: [ ['A319',13.8], ['747-400',6.9], ['777-300',3.4], ['Unspecified',6.9], ['E170',3.4], ['777-200',6.9], ['737-800',13.8], ['A330-200',6.9], ['A320',17.2], ['Dash 8-400Q',10.3], ['A321',3.4], ['737-900ER',6.9] ] }] }); }); });