var legendsector = {}; legendsector['A320'] = 25 legendsector['737-800'] = 5 legendsector['737-700'] = 3 legendsector['Unspecified'] = 3 legendsector['747-400'] = 4 legendsector['A380-800'] = 2 legendsector['A321'] = 10 legendsector['A319'] = 11 $(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.7], ['737-800',7.9], ['737-700',4.8], ['Unspecified',4.8], ['747-400',6.3], ['A380-800',3.2], ['A321',15.9], ['A319',17.5] ] }] }); }); });