var legendsector = {}; legendsector['B777'] = 2 legendsector['A380'] = 5 legendsector['B737'] = 5 legendsector['TYPE'] = 1 legendsector['Fokker'] = 2 legendsector['DH8'] = 5 legendsector['Unspecified'] = 2 legendsector['A320'] = 5 legendsector['A350'] = 3 legendsector['FOKKER 70'] = 1 legendsector['SAAB340'] = 7 legendsector['A330'] = 2 $(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: [ ['B777',5], ['A380',12.5], ['B737',12.5], ['TYPE',2.5], ['Fokker',5], ['DH8',12.5], ['Unspecified',5], ['A320',12.5], ['A350',7.5], ['FOKKER 70',2.5], ['SAAB340',17.5], ['A330',5] ] }] }); }); });