<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Continent', 'Population'],
['Asia', 59.54],
['Europe', 9.59],
['Africa', 17.20],
['North America', 7.60],
['South America', 5.53],
['Australia', 0.55],
['Antarctica', 0.00]
]);
var options = {
title: 'Population across continents',
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="piechart" style="width: 1000px; height: 500px;"></div>
</body>
*{
padding:0;
margin:0;
}
.chart{
margin:150px auto;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.