How are you constructing your table? You should have either a DataTable
object or a ChartWrapper object. If you have a DataTable object, use the
#getValue method (which takes a row and column as arguments; note that the
Table's select event only gives row, so you'll have to parse the columns
manually). If you have a ChartWrapper object, use the #getDataTable method
to get a locally defined data table. If you made a remote query with a
ChartWrapper, then I think the only way to get at the underlying data is to
pull the data source URL with the #getDataSourceUrl method and then make a
second query to the data source and build a data table from the response.
/* assumes:
* wrapper is the chart wrapper object used to draw the chart
* row is the row to query
* cols is an array of column indices to get values from
* cells is an (empty) array to hold the data in
*/
var query = new google.visualization.Query(wrapper.getDataSourceUrl());
query.send(function(response) {
var data = response.getDataTable();
for (i = 0; i < cols.length; i++) {
cells[i] = data.getValue(row, cols[i]);
}
});
--
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/-/HdnxcawxTfoJ.
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.