Where to incorporate that function in following code and please correct the 
code if necessary.


<html>
  <head>
    <script type='text/javascript'           
 src='https://www.google.com/jsapi'></script>
      <script type="text/javascript">
          google.load('visualization', '1', {
    packages: ['gauge']
});
google.setOnLoadCallback(drawChart);



function drawChart() {
    var data = google.visualization.arrayToDataTable([
        ['Label', 'Value'],
        *['Flow', 0]*
        ]);

    var options = {
        width: 400,
        height: 120,
        redFrom: 90,
        redTo: 100,
        yellowFrom: 75,
        yellowTo: 90,
        minorTicks: 5
    };
    var chart = new 
google.visualization.Gauge(document.getElementById('chart_div'));
    chart.draw(data, options);

    // dynamic update, randomly assign new values and redraw
    
  
    *setInterval(function() {*
*        var flow = $.ajax({url: 'Gauge.php', dataType: 'text', async: 
false}).responseText;*
*        data.setValue(0, 1, flow);*
*        chart.draw(data, options);*
*    }, 5000);*
*
*
*
*
      </script>
  </head>
  <body>
    <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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to