Hi guys, I notice that sometimes when I load a chart using Google chart api
(generating the script code using php "echo") whit forefox (no problem with
iE), even if the data of the graph shoud be different, the image I can see
is the same of the last graph loaded. It seems that firefox use a sort of
cache momory for the graph.

I would like to solve this problem non operating in firefox options, but
generating every time a graph with a different name, or using variables with
a different name:

where can I insert (concatenating to an existing variable) a counter var, if
all my graphs are generated from this kind of code:


<script type="text/javascript">
var queryString = '';
var dataUrl = '';
function onLoadCallback()
{
  if (dataUrl.length > 0)
  {
    var query = new google.visualization.Query(dataUrl);
    query.setQuery(queryString);
    query.send(handleQueryResponse);
  }
  else
  {
    var dataTable = new google.visualization.DataTable();
    dataTable.addRows(7);
    dataTable.addColumn('number');
    dataTable.setValue(0,0,6);
    etc etc
    draw(dataTable);
  }
}

function draw(dataTable)
{
  var vis = new google.visualization.ImageChart(document.getElementById(
'grafico'));
  var options = {etc etc'};
  vis.draw(dataTable, options);
}
function handleQueryResponse(response)
{
  if (response.isError())
  {
     alert('Error in query: ' + response.getMessage() + '
'+response.getDetailedMessage());
     return;
  }
  draw(response.getDataTable());
}
google.load("visualization", "1", {packages:["imagechart"]});
google.setOnLoadCallback(onLoadCallback);
</script>


querystring? dataUrl?

I would like to use querystring1, querystring2, querystring3, etc etc (or
what other variable) every time I load a graph in my php session so to avoid
this problem.

Or can I solve in another way?

Thanks a lot

Andrea

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to