Re: ChartWrapper in Dashboard with remote data source

123 views
Skip to first unread message

asgallant

unread,
Nov 19, 2012, 2:37:23 AM11/19/12
to google-visua...@googlegroups.com
When using Dashboards, you cannot use the refreshInterval to requery your data source.  You have to use the Query class to create a query and the setTimeout or setInterval js functions to resend the query.  You fetch the DataTable from the data returned by the query and pass it to the Dashboard object when you call the Dashboard's #draw method.  The Dashboard handles distributing data to all of the controls and charts bound in the Dashboard.

On Sunday, November 18, 2012 8:58:30 PM UTC-5, David Vine wrote:
Hi,

I'm trying to use ChartWrapper objects in a dahsboard with a remote data source and have the data refresh using refreshInterval.

In the docs it says:
Do not set its dataTablequerydataSourceUrl and refreshInterval attributes explicitly.

My question is how do I set these if not explicitly? 

Thanks,
David
Message has been deleted
Message has been deleted

David Vine

unread,
Nov 19, 2012, 4:51:43 PM11/19/12
to google-visua...@googlegroups.com
Thanks asgallant!

After following your help I was able to get the query to run once after the initial onload callback. Setting the refreshinterval had no effect until I set it inside the call back handler for the first query. Not sure why that works but glad that it does...

asgallant

unread,
Nov 19, 2012, 5:10:25 PM11/19/12
to google-visua...@googlegroups.com
I should add as clarification, that the Query#setRefreshInterval method is what you should use here.  The reason it doesn't work in the ChartWrapper when using a Dashboard, is because the ChartWrapper doesn't have an internal query to refresh.
Reply all
Reply to author
Forward
0 new messages