var legendsector = {}; legendsector['A320'] = 18 legendsector['A319'] = 11 legendsector['A330-300'] = 1 legendsector['E175'] = 2 legendsector['A321'] = 6 legendsector['737-800'] = 2 legendsector['777-200ER'] = 2 legendsector['E190'] = 1 legendsector['777-300ER'] = 1 legendsector['A380-800'] = 1 legendsector['787-10'] = 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',39.1], ['A319',23.9], ['A330-300',2.2], ['E175',4.3], ['A321',13], ['737-800',4.3], ['777-200ER',4.3], ['E190',2.2], ['777-300ER',2.2], ['A380-800',2.2], ['787-10',2.2] ] }] }); }); });