I want to use Google Annotated Time Line to generate a graph using values
generated from a PHP script, so far I have:
<script type='text/javascript'>
google.load('visualization', '1', {'packages':['annotatedtimeline']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('date', 'Date');
data.addColumn('number', 'Data');
data.addRows([
[new Date($y1, 1, 1), $value_y1_1],
[new Date($y1, 2, 1), $value_y1_2],
[new Date($y1, 3, 1), $value_y1_3],
]);
var chart = new
google.visualization.AnnotatedTimeLine(document.getElementById('chart_div1'));
chart.draw(data, {displayAnnotations: true});
}</script>
I want to add more monthly data points, from $y1 to $y80, with the
corresponding $value. I used a for loop but got "undefined variable" error.
Suggestions?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.