a coffee consumption chart
a google charts experiment queries a fusion table for yearly coffee consumption by country.
html
<script src="//www.google.com/jsapi?fake=.js"></script>
<body style="font-family: Arial; border: 0 none">
<div id="visualization_div" style="width: 600px; height: 400px"></div>
</body>
javascript
google.load("visualization", "1", { packages: ["corechart"] });
function drawVisualization() {
var queryText = encodeURIComponent(
"SELECT Year, Austria, Bulgaria, Denmark, Greece FROM 641716",
);
google.visualization.drawChart({
containerId: "visualization_div",
dataSourceUrl: "https://www.google.com/fusiontables/gvizdata?tq=",
query: "SELECT Year, Austria, Bulgaria, Denmark, Greece FROM 641716",
refreshInterval: 5,
chartType: "BarChart",
options: {
title: "Yearly Coffee Consumption by Country",
vAxis: { title: "Year" },
hAxis: { title: "Cups" },
},
});
}
google.setOnLoadCallback(drawVisualization);
this demo preserves the compiled output and may depend on external libraries or services that are no longer available.