Hi all
Thank you for all your responses, much appreciated.
I have pasted the code below as I have it on the page - the source of
the data is on a google spreadsheet.
<!--
You are free to copy and use this sample in accordance with the terms
of the
Apache license (
http://www.apache.org/licenses/LICENSE-2.0.html)
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="
http://www.google.com/jsapi"></
script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['gauge']});
</script>
<script type="text/javascript">
<script type="text/javascript" src="
http://www.google.com/
jsapi"></script><script type="text/javascript">
google.load('visualization', '1', {packages: ['gauge']});
</script><script type="text/javascript">
function drawVisualization() {
var query = new google.visualization.Query('https://
spreadsheets.google.com/spreadsheet/tq?range=B1:B2&key=0Ai2BdaB-
nmSmdGI3S08xSnlOWS1XbWVxTjJkekFjY0E&gid=0');
// Send the query with a callback function.
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
// Create and draw the visualization.
new
google.visualization.Gauge(document.getElementById('visualization')).
draw(data, {
min: 0,
max: 15000
});
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="visualization" style="width: 600px; height: 300px;"></
div>
</body>
</html>
<!--
You are free to copy and use this sample in accordance with the terms
of the
Apache license (
http://www.apache.org/licenses/LICENSE-2.0.html)
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
<title>
Google Visualization API Sample
</title>
<script type="text/javascript" src="
http://www.google.com/jsapi"></
script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['gauge']});
</script>
<script type="text/javascript">
<script type="text/javascript" src="
http://www.google.com/
jsapi"></script><script type="text/javascript">
google.load('visualization', '1', {packages: ['gauge']});
</script><script type="text/javascript">
function drawVisualization() {
var query = new google.visualization.Query('https://
spreadsheets.google.com/spreadsheet/tq?range=B1:B2&key=0Ai2BdaB-
nmSmdGI3S08xSnlOWS1XbWVxTjJkekFjY0E&gid=0');
// Send the query with a callback function.
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
// Create and draw the visualization.
new
google.visualization.Gauge(document.getElementById('visualization1')).
draw(data, {
min: 0,
max: 15000
});
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="visualization1" style="width: 600px; height: 300px;"></
div>
</body>
</html>