var legendsector = {}; legendsector['A319'] = 6 legendsector['A321'] = 11 legendsector['A320'] = 21 legendsector['777-200ER'] = 2 legendsector['777-300ER'] = 2 legendsector['E190'] = 2 legendsector['E195-E2'] = 1 legendsector['737-800'] = 4 legendsector['A350-1000'] = 1 legendsector['787-10'] = 1 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: [ ['A319',11.5], ['A321',21.2], ['A320',40.4], ['777-200ER',3.8], ['777-300ER',3.8], ['E190',3.8], ['E195-E2',1.9], ['737-800',7.7], ['A350-1000',1.9], ['787-10',1.9], ['737-700',1.9] ] }] }); }); });