Geo Legend
HTML
<script src="http://www.google.com/jsapi?dummy=.js"></script>
<div id="wrapper">
<div id="chart_div"></div>
</div>
CSS
#wrapper {
height: 300px;
overflow: hidden;
}
#chart_div {
min-height: 500px;
}
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'],
['', 50],
['Eat', 10],
['Commute', 10],
['Watch TV', 10],
['Sleep', 10],
['Sex', 10],
]);
// 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,
pieStartAngle: 90,
});
};