<html> <head> <script type="text/javascript"
src="https://www.google.com/jsapi
<view-source:https://www.google.com/jsapi>"></script> <script
type="text/javascript"> google.load("visualization", "1",
{packages:["corechart"]}); google.setOnLoadCallback(drawChart);
function drawChart() { var jsonData = $.ajax({ url:
"getData.php", dataType:"json", async: false
}).responseText; var data = new
google.visualization.DataTable(jsonData); var options = {
title: 'Actuele watertemperatuur Domelaar' }; var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options); } </script> </head> <body> <div
id="chart_div" style="width: 900px; height: 500px;"></div> </body></html>
Output of getData.php is
{"cols":[{"label":"Date","type":"date"},{"label":"Temp","type":"double"}],"rows":[{"c":[{"v":"2013-06-01"},{"v":14}]},{"c":[{"v":"2013-06-02"},{"v":14}]},{"c":[{"v":"2013-06-03"},{"v":14}]},{"c":[{"v":"2013-06-04"},{"v":14}]},{"c":[{"v":"2013-06-05"},{"v":14}]},{"c":[{"v":"2013-06-08"},{"v":15}]},{"c":[{"v":"2013-06-06"},{"v":15}]},{"c":[{"v":"2013-06-09"},{"v":15}]},{"c":[{"v":"2013-06-07"},{"v":15}]}]}
--
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.