How create real time graphs??

2,660 views
Skip to first unread message

fyno

unread,
Sep 15, 2011, 4:41:18 AM9/15/11
to Google Visualization API
Hi all,

I´m trying to create a dashboard with a Real Time Graph. I would like
to use Annotated Time Line graph refreshing it each second (for
example), but i don´t want to reload the webpage; i don´t know how to
do it.

I´m using javascript and JSP for this dashboard, so i´ll be very
graceful if somebody could help me.


Thank you very much.

Riccardo Govoni ☢

unread,
Sep 15, 2011, 12:24:27 PM9/15/11
to google-visua...@googlegroups.com
If you use ChartWrapper to draw your chart then you can set a refresh interval that it will tell the chart how often to query the datasource for fresh data (assuming your chart is pulling data from a remote datasource whose contents are constantly changing) and redraw itself.

Since the Annotated Timeline is based on Flash, you should set its allowRedraw option for optimized fast redraws to avoid the flickering that might occur when redrawing it frequently like you suggest.

-- R.


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


asgallant

unread,
Sep 15, 2011, 12:27:32 PM9/15/11
to google-visua...@googlegroups.com
If you are querying a remote data source using the viz API's query method, the easiest way to get real-time data is to use the #setRefreshInterval method of the query (or the ChartWrapper object, if you are using that).  If you have a custom data source, you'll have to write your own function to fetch the data using AJAX. 

Mireille Raad

unread,
May 2, 2013, 8:40:41 PM5/2/13
to google-visua...@googlegroups.com
Hey,


the example files are provided for download 
and they are also on the page

This is a realtime updating chart with AJAX - even better then refresh then every 1ms

Hope this is helpful.

asgallant

unread,
May 2, 2013, 10:46:44 PM5/2/13
to google-visua...@googlegroups.com
It's nice to see someone spreading the love with the Viz API, but since the PHP code you posted there was written by me, I would appreciate an attribution.

Mithrandir Istari

unread,
Nov 12, 2015, 10:41:07 AM11/12/15
to Google Visualization API
Hi, I know that time has passed (and someone could start to get angry because I'm posting in a 2 years old post), but I really need to know your solution for the real-time graphs, but the link's website is down. Do you have a copy of the example files that you can send me, or in a GitHub repository or in another web page?

Thank you very much for your reply!
Reply all
Reply to author
Forward
0 new messages