The data source doesn't have to be a Google spreadsheet - they are just one of the options. There are Java and Python data source libraries available from the Viz API (see http://code.google.com/apis/chart/interactive/docs/dev/implementing_data_source.html) if you want to use those. If you're more comfortable working in PHP, you can build your own Query-compatible data source, or use standard AJAX to fetch data in JSON format from a script like this: https://groups.google.com/d/msg/google-visualization-api/Gy18YdVSSfQ/tKdtzSfqKlcJ, which you can then feed to a DataTable constructor.
On Thursday, March 29, 2012 3:01:22 AM UTC-4, shub wrote: > > Hi, > > Thanks for your reply. > I went through the google visualization query class, but in the > documentation it is mentioned to provide an speadsheet UR, that means we > have to store/keep updating the spreadshee as our table is updated. Is > there any other option to fetch the data from live database and then > plotting the graph. I want the graph to load with the new data content from > the database if there an update in the database....? > > And even, I am using PHP and MYSQL to draw the graph. If you could provide > me an example code for doing the same would be really helpful. > > Thanks in advance. > > > On Wednesday, 28 March 2012 23:10:33 UTC+5:30, asgallant wrote: >> >> You can do this. Are you using the Visualization Query class to fetch >> your data, or are you using some other method? If you are using the >> Queries, you can use the setRefreshInterval method to set the number of >> seconds between refreshing the data. If you use another method (like >> fetching data from your server using AJAX), you can use the basic >> javascript setTimeout function to set the refresh interval, or (better, in >> my humble opinion) use something like jQuery's queue and delay functions to >> handle the refresh and timing. >> >> On Wednesday, March 28, 2012 9:07:54 AM UTC-4, shub wrote: >>> >>> Hi, >>> >>> I am working on a line chart which needs to fetch the data from database >>> , and as I am refreshing the chart div after every "n seconds" , I want the >>> chart to be drawn with new data values. >>> >>> Is this possible.... ?? >>> >>> Please reply, if anyone knows how to resolve this issue.... ? >>> >>> >>> Thanks in advance. >>> >>> >>> >>> >>> >>> > On Wednesday, 28 March 2012 23:10:33 UTC+5:30, asgallant wrote: >> >> You can do this. Are you using the Visualization Query class to fetch >> your data, or are you using some other method? If you are using the >> Queries, you can use the setRefreshInterval method to set the number of >> seconds between refreshing the data. If you use another method (like >> fetching data from your server using AJAX), you can use the basic >> javascript setTimeout function to set the refresh interval, or (better, in >> my humble opinion) use something like jQuery's queue and delay functions to >> handle the refresh and timing. >> >> On Wednesday, March 28, 2012 9:07:54 AM UTC-4, shub wrote: >>> >>> Hi, >>> >>> I am working on a line chart which needs to fetch the data from database >>> , and as I am refreshing the chart div after every "n seconds" , I want the >>> chart to be drawn with new data values. >>> >>> Is this possible.... ?? >>> >>> Please reply, if anyone knows how to resolve this issue.... ? >>> >>> >>> Thanks in advance. >>> >>> >>> >>> >>> >>> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/W5gGcEL_0wUJ. 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.
