Progress has been made, I think now the issue could be a PHP one the
following generates the place holders and graphs for each but unfortunately
it's all the same graph and data it is as though the data call is not
changing the variable name on the ned in order to create a new query. the
following is the code that is semi-working:
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
for (var i =1; i<=<?php echo $mycount ?>; i++){
var data = google.visualization.arrayToDataTable(<?php echo
${"mychartdatax".$myvar++}; ?>);
var options = { colors: ['#FFA500'],legend: {position:'none'},};
var chart = new
google.visualization.ColumnChart(document.getElementById("chart_div"+i));
chart.draw(data, options);
}
}
</script>
The part that pulls in the data seems stuck with $myvar being initialized
in the php above this code to be 1, and it goes through the loop but it
seems to be only incrementing once and then stopping. Its either that or
the generation of the singular chart.draw(data,options) instance keeps
rewriting the generated graphs to the last one, but I caputured the loop it
is supposed to go through 3 times but the variable only makes it as far as
2. I am lost
--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/e9cabb8c-4743-4f36-8bd7-b0734e6e02c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.