Javascript examples for highcharts:Pie Chart
enlarge the pie chart and shift to the center
<html> <head> <title>Highcharts Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <style id="compiled-css" type="text/css"> #container{/* ww w. j a va 2 s. co m*/ margin: 0 auto; width: 500px; height: 400px; border: 1px solid red; } </style> <script type="text/javascript"> $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'pie' }, title: { text: 'Pesticide Residues On Domestic and Imported Foods' }, subtitle: { text: 'Percent of foods that exceed FDA or EPA tolerances', }, plotOptions: { pie: { dataLabels: { enabled: false } } }, series: [{ name: 'Domestic foods', size: 250, x: 0, center: [100, 100], data: [ ['Firefox', 44.2], ['IE7', 26.6], ['IE6', 20], ['Chrome', 3.1], ['Other', 5.4] ] }, { name: 'Imported foods', size: 150, center: [300, 100], data: [ ['Firefox', 44.2], ['IE7', 26.6], ['IE6', 20], ['Chrome', 3.1], ['Other', 5.4] ] }] }); }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.js"></script> <div id="container"></div> </body> </html>