var legendsector = {}; legendsector['Unspecified'] = 197 legendsector['CRJ-1000'] = 1 legendsector['A330-200'] = 4 legendsector['Batavia Air'] = 4 legendsector['A330-300'] = 7 legendsector['miss fligt'] = 1 legendsector['miss flight'] = 2 legendsector['B777-300'] = 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: [ ['Unspecified',90.4], ['CRJ-1000',0.5], ['A330-200',1.8], ['Batavia Air',1.8], ['A330-300',3.2], ['miss fligt',0.5], ['miss flight',0.9], ['B777-300',0.9] ] }] }); }); });