The important view for the drilldown is this one:
google.visualization.events.addListener(chart, 'select', function () {
var sel = chart.getChart().getSelection();
var country = data.getValue(sel[0].row, 0);
var rows = data2.getFilteredRows([{column: 0, value: country}]);
var view = chart2.getView();
view.rows = rows;
chart2.setView(view);
chart2.draw();
});
and the only requirement here is that the drilldown and filtering happens
on column 0 in both DataTables (and you can change that to be a different
column, if necessary). Whether the data is dynamic or not is irrelevant.
On Friday, March 14, 2014 10:55:01 AM UTC-4, Doug Elder wrote:
>
> Do you have an example using dynamic json data? I'm new to this and don't
> see how you'd dynamically set the view. Any help would be appreciated.
>
> On Monday, January 14, 2013 7:11:13 PM UTC-5, asgallant wrote:
>>
>> Here's an example: http://jsfiddle.net/asgallant/x5Eth/
>>
>> On Monday, January 14, 2013 5:53:39 PM UTC-5, Raji wrote:
>>>
>>> Here is the format of my chart: http://jsfiddle.net/asgallant/zwPuU/
>>>
>>> I would like to add drill down functionality - Clicking on USA should
>>> yield another chart with US states etc. All the charts would be clickable
>>> to a drill down version.
>>>
>>> I understand I have to use the selection event, could you give me an
>>> example of that?
>>>
>>> Thanks in advance!
>>>
>>>
--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.