<!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:
['AnnotatedTimeLine']});
</script>
<script type="text/javascript">
var visualization;
function drawVisualization() {
// To see the data that this visualization uses, browse to
// http://spreadsheets.google.com/ccc?key=pCQbetd-CptGXxxQIG7VFIQ
// var query = new
google.visualization.Query('files').fileslist.value;
selectFile = function() {
var data = new
google.visualization.DataTable().fileslist.value;
chart.setLoading("Loading new details..")
visualization.draw(data, null);("AnnotatedTimeLine")
google.load('visualization', '1', {'packages':
['annotatedtimeline']});
google.setOnLoadCallback(drawChart);
//var chart = new
google.visualization.AnnotatedTimeLine(document.getElementById('visualization'));
chart.draw(data, {displayAnnotations: true}); }
// 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();
visualization = new
google.visualization.AnnotatedTimeLine(document.getElementById('visualization'));
visualization.draw(data, null);
}
</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<h1>Set XML Path Sample - <span class="main">changing map XML file
at run-time</span></h1>
<p>Files list is stored in Combo box. When you choose list item and
click "Load selected map" - file name is read from item value and set
as a path to AnyChart.</p>
<table border="0" width="100%" height="520" cellspacing="0"
celppadding="0">
<tr height="20">
<td width="100%" valign="top"><form name="files" id="files">
<!-- In this select we store file pathes -->
<!-- selectFile() is launched on click event -->
<select name="fileslist" id="files">
<option value="http://spreadsheets.google.com/tq?key=pCQbetd-
CptGXxxQIG7VFIQ&pub=1">Chart1</option>
<option value="./fusionchartsdata/chart2.xls">Chart2</
option>
<option value="http://spreadsheets.google.com/tq?key=pCQbetd-
CptGXxxQIG7VFIQ&pub=1">Chart3</option>
<option value="./fusionchartsdata/chart5.xls">Chart5</
option>
</select>
</form>
<input name="Button" type="button" onclick="selectfile"
value="Load selected Chart"/></td>
</tr>
<tr height="500">
<td valign="top"><!-- In this div we will place chart-->
<div id="visualization" style="height: 400px; width: 900px;"></
div>
</tr>
</table>
</body>
</html>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.