I'm getting two different behaviors from the ChartWrapper method
getDataTable. If the ChartWrapper is not in a dashboard, the method
returns a reference to the DataTable. Or, if it's in a dashboard, and the
dashboard hasn't finished drawing, I get a reference to the DataTable.
If the chart is in a dashboard and the dashboard has finished drawing,
getDataTable returns an object that contains arrays of the viewable columns
and rows.
For example, the two log statements here show different results.
google.visualization.events.addListener(dashboard, 'ready', function() {
console.log(chartWrapper.getDataTable().toJSON()); // the viewable columns
and rows
});
console.log(chartWrapper.getDataTable().toJSON()); // reference to the
DataTable
dashboard.draw(data);
I don't see the differences in functionality here in the documentation.
My first question is, why is this happening?
My second question is this. I would like to get the DataTable before and
after filtering. To get the DataTable after filtering, do I have to
construct it by taking the original DataTable and removing the rows that
have been filtered, that I get from calling getDataTable after the chart is
drawn?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/49093c70-07ec-4b7f-a39a-826445907e2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.