var legendsector = {}; legendsector['DH8D'] = 108 legendsector['B763'] = 66 legendsector['B738'] = 50 legendsector['B734'] = 6 legendsector['A320'] = 6 legendsector['DH8C'] = 38 legendsector['SF34'] = 10 legendsector['B744'] = 3 legendsector['A333'] = 1 legendsector['A332'] = 2 legendsector['RJ140'] = 2 legendsector['A388'] = 2 legendsector['DH8B'] = 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: [ ['DH8D',36.6], ['B763',22.4], ['B738',16.9], ['B734',2], ['A320',2], ['DH8C',12.9], ['SF34',3.4], ['B744',1], ['A333',0.3], ['A332',0.7], ['RJ140',0.7], ['A388',0.7], ['DH8B',0.3] ] }] }); }); });