maxValue: 24, <html> <head> <!--Load the AJAX API--> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> // Load the Visualization API and the piechart package. google.load('visualization', '1', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: "getData2.php", dataType:"json", async: false }).responseText; var options = { width: 900, height: 500, title: 'Temperatuur Woonkamer', hAxis: { format: 'EE HH:mm' }, vAxis: { maxValue: high, minValue: low, title: 'Temperatuur C' } }; // Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(jsonData); var high = ((data.getColumnRange(1).max) + 3); var low = (data.getColumnRange(1).min); alert (high);
var dateFormatter = new google.visualization.DateFormat({pattern: 'dd-MM-yyyy HH:mm'}); dateFormatter.format(data, 0); // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, options); }
</script> </head>
<body> <!--Div that will hold the pie chart--> <div id="chart_div"></div> </body></html>--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
<html> <head> <!--Load the AJAX API--> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript"> // Load the Visualization API and the piechart package. google.load('visualization', '1', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ url: "getData2.php", dataType:"json", async: false }).responseText;
// Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(jsonData); var high = ((data.getColumnRange(1).max) + 3); var low = ((data.getColumnRange(1).min) - 3); var dateFormatter = new google.visualization.DateFormat({pattern: 'dd-MM-yyyy HH:mm'}); dateFormatter.format(data, 0); var options = { width: 900, height: 500, title: 'Temperatuur Woonkamer', hAxis: { format: 'EE HH:mm' }, vAxis: { maxValue: high, minValue: low, title: 'Temperatuur C' } }; // Instantiate and draw our chart, passing in some options. var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, options); }
</script> </head>
<body> <!--Div that will hold the pie chart--> <div id="chart_div"></div> </body></html>To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.