Javascript examples for highcharts:Pie Chart
show count of data in pie chart
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.3.min.js"></script> <script type="text/javascript"> $(function(){/*from www. j a v a2s . co m*/ window.chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'pie' }, legend: { labelFormat: '{name} : {y} ({percentage:.1f}%)', layout: 'vertical', align: 'right' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: false }, showInLegend: true } }, series: [{ type: 'pie', name: 'Browser share', data: [ ['Firefox', 45.0], ['IE', 26.8], ['Chrome', 12.8], ['Safari', 8.5], ['Opera', 6.2], ['Others', 0.7] ] }] }); }); </script> </head> <body> <script type="text/javascript" src="https://code.highcharts.com/highcharts.js"></script> <div id="container" style="height: 300px; width: 400px"></div> </body> </html>