var legendsector = {}; legendsector['A320'] = 23 legendsector['E190'] = 6 legendsector['A319'] = 19 legendsector['777-200ER'] = 1 legendsector['747-400'] = 3 legendsector['E170'] = 1 legendsector['A321'] = 3 legendsector['737-700'] = 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: [ ['A320',40.4], ['E190',10.5], ['A319',33.3], ['777-200ER',1.8], ['747-400',5.3], ['E170',1.8], ['A321',5.3], ['737-700',1.8] ] }] }); }); });