Hi there,
I am trying to create a pie chart which refreshes it's datatable using
Query.send(callback). But I can't get it to refresh. It fetches the
datatable and draws the pie chart correctly the first time, but it
seems to ignore the setRefreshInterval method.
(I can tell that it is not sending requests because the first thing my
servlet does on the other end is print a message to the logs. One
message is printed for the first query.send, but none after that.)
I'd really apprecate a bit of advice here, as I feel like I'm banging
my head against a very hard wall! :-)
I'm wondering, is the problem the lack of a "sig" property in the URI?
final Runnable onLoadCallback = new Runnable() {
public void run() {
Query query =
Query.create("http://localhost:8084/FetchDataTable");
query.setRefreshInterval(5);
query.send(new Callback(){
public void onResponse(QueryResponse response) {
if (response.isError())
SC.say("An error occured: " +
response.getDetailedMessage());
else
{
pie = new
PieChart(response.getDataTable(), createPieChartOptions
(width, height, title));
pie.setWidth(width + "px");
pie.setHeight(height + "px");
pie.addSelectHandler(createPieChartSelectHandler(pie));
hLayout.add(pie);
}
}
});
}
};
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Visualization 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-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---