Geo Legend
HTML
<script src="http://www.google.com/jsapi?dummy=.js"></script>
<div id="chart_div"></div>
JavaScript
google.load('visualization', '1.1', {
'packages': ['corechart']
});
google.setOnLoadCallback(drawChart);
function drawChart() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
// Create and draw the visualization.
new google.visualization.PieChart(document.getElementById('chart_div')).
draw(data, {
title: "So, how was your day?",
slices: {
0: {
color: 'transparent',
enableInteractivity: false
}
},
pieHole: 0.5,
width: 600,
height: 600
});
};