var legendsector = {}; legendsector['Unspecified'] = 247 legendsector['A380'] = 28 legendsector['767'] = 1 legendsector['787-9'] = 4 legendsector['A380 Emirates'] = 10 legendsector['A350-900'] = 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: [ ['Unspecified',84.6], ['A380',9.6], ['767',0.3], ['787-9',1.4], ['A380 Emirates',3.4], ['A350-900',0.3], ['787-10',0.3] ] }] }); }); });