var legendsector = {}; legendsector['E190'] = 4 legendsector['A319'] = 46 legendsector['A320'] = 10 legendsector['A321'] = 8 legendsector['A320neo'] = 1 legendsector['ERJ-190'] = 1 legendsector['A330'] = 1 legendsector['A318'] = 1 legendsector['B737-8'] = 1 legendsector['B767'] = 1 legendsector['B747'] = 1 legendsector['E170'] = 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: [ ['E190',5.3], ['A319',60.5], ['A320',13.2], ['A321',10.5], ['A320neo',1.3], ['ERJ-190',1.3], ['A330',1.3], ['A318',1.3], ['B737-8',1.3], ['B767',1.3], ['B747',1.3], ['E170',1.3] ] }] }); }); });