There are a number of different ways to approach this, but lets start with the simplest case. When you receive data for the first time, build a new DataTable with it. You can then update the DataTable (using the #setValue or #setCell methods to change an existing cell, or the #addRow/#addRows methods to add new data) and redraw your chart(s). To do this, your charts and DataTable will have to be in scope for your data retrieval.
I can help more if you could show me the code you are using to get everything started; then we can figure out exactly how to approach this to best suit your needs. On Friday, November 9, 2012 11:43:14 AM UTC-5, diferdin wrote: > > Hi all, > I am getting to know Google Charts for the first time, and I struggle to > understand how to do the following so I thought to ask the group. I have > tried to search for other similar threads in this same group but I was > unsuccessful. > > What I am essentially trying to to is to draw a (column) chart dynamically > as I receive data to chart. Data is pushed by a push engine (hence I do not > need to query for it), and upon reception of a message I need to either > update the value for a row or add it, in case the row is not already in it. > > I roughly think I should create my DataTable initially and then > amend/redraw every time I receive a new message, but I am not clear how I > do that (e.g. how do I get hold of the DataTable ised by a chart? Should I > use a ChartWrapper?). > > Any idea/suggestion/pointer to similar threads is appreciated. > > 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/-/UDpmuX4gBM8J. 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.
