<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi">
</script>
<script type="text/javascript>
google.load("visualization", "1", {
packages: ["corechart"]
});
google.setOnLoadCallback(drawAll);
function drawAll() {
drawChart();
drawChart2();
}
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities',
pieHole: 0.4,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart'));
chart.draw(data, options);
}
function drawChart2() {
var data2 = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options2 = {
title: 'My Daily Activities',
pieHole: 0.4,
};
var chart2 = new google.visualization.PieChart(document.getElementById('donutchart'));
chart2.draw(data2, options2);
}
</script>
</head>
<body>
<div id="donutchart" style="width: 900px; height: 500px;"></div>
</body>
</html>
I wish to include multiple charts on the same page and explore various chart types provided by Google Chart Tool from this URL: