//How do you get this graph to refresh every second with new plots
automatically? what code do i need to add?
<html>
<head>
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Age', 'Series 1', 'Series 2'],
[ <?php echo $playerx01;?>, <?php echo $playery01;?>, null],
[ <?php echo $playerx02;?>, <?php echo $playery02;?>, null],
[ <?php echo $playerx03;?>, <?php echo $playery03;?>, null],
[ <?php echo $playerx04;?>, <?php echo $playery04;?>, null],
[ <?php echo $playerx05;?>, <?php echo $playery05;?>, null],
[ <?php echo $player1x01;?>, null, <?php echo $player1y01;?>],
[ <?php echo $player1x02;?>, null, <?php echo $player1y02;?>],
[ <?php echo $player1x03;?>, null, <?php echo $player1y03;?>],
[ <?php echo $player1x04;?>, null, <?php echo $player1y04;?>],
[ <?php echo $player1x05;?>, null, <?php echo $player1y05;?>],
[ <?php echo $player1x05;?>, null, <?php echo $player1y05;?>]
]);
var options = {
title: 'Defence',
hAxis: {title: '', minValue: 0, maxValue: 15},
vAxis: {title: '', minValue: 0, maxValue: 15},
legend: 'none',
};
var chart = new
google.visualization.ScatterChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.