Hi Gabe, I understand you have a CategoryFilter driving a table visualization and they are already bound together via a surrounding Dashboard. If, after the state change you just want to get out the filtered records, it should be enough for you to do the following in the statechange event handler:
ALtable.getDataTable(); This will extract from the chartwrapper (ALtable) the datatable that was used to draw the Table the wrapper contains. Such datatable contains only the filtered records. The selection is something different, and pertains to the records that the user manually selected on the Table (such as rows he clicked) and has nothing to do with the filtering operated by the CategoryFilter. Let me know if this helps you. If you still have troubles, I'll set up a quick example to mimic your case. - R. On 28 January 2012 21:18, Gabe <[email protected]> wrote: > I have a Table ChartWrapper that is filtered by a CategoryFilter. I > have a statechange event listener on the CategoryFilter. After the > state change, I want to read just the filtered records from the > Chartwrapper, but I can't see to access them. I thought I would be > able to access the data records through table.getChart(), but I an > having trouble and see in the documentation (http://code.google.com/ > apis/chart/interactive/docs/gallery/table.html ) that I can > getSelection(), but I can't get number of rows, or actually access the > rows with getValue(). I would try to select all the records in the > wrapper, then access the selection, but I don't know how to do that > without being able to at least get the count of them. Am I missing > something here? any suggestions would be appreciated. thanks > > LocDataTab = response.getDataTable(); > > aliasFilter = new > google.visualization.ControlWrapper({ > 'controlType': 'CategoryFilter', > 'containerId': 'AliasCombo_div', > 'options': { > 'filterColumnIndex': 0, > 'ui': {'labelStacking': > 'horizontal', > 'selectedValuesLayout': > 'belowStacked' // 'height': '150px'}, > } > } > }); > > > > ALtable = new google.visualization.ChartWrapper({ > 'chartType': 'Table', > 'containerId': 'AllLocsTable_div', > 'view': {'columns': [0,1,2,3,4,5,6,7]} , > //"allowHtml": true, > 'options': {'height': '190px', } > > }); > > var LocVis = new > > google.visualization.Dashboard(document.getElementById('AllLocsTable_div')). > bind([aliasFilter], ALtable); > > google.visualization.events.addListener(ALtable, 'ready', > onReady); > google.visualization.events.addListener(ALtable, 'select', > selectHandler); > google.visualization.events.addListener(aliasFilter, > 'statechange', > mapIt); > > LocVis.draw(LocDataTab); //options {height:300} > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > 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. > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. 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.
