I have a table and one of its columns has multiple duplicates. I want to 
filter all the rows that have the same value on the column at once. I tried 
to use the getFormattedValue() method which gets the value of a column and 
then applied the usual code for DataView. When I click on the row, it 
leveas jst the selected row of the table and it doesn't filter all the rows 
with the duplicate vale on the column. Here is my code so far:

 var table = new 
google.visualization.Table(document.getElementById('chart_div'));var items = " 
";
 table.draw(dataTable, {width: 1000, height: 300});
google.visualization.events.addListener(table, 'select',
    function(event) {
        var selection = table.getSelection();
        var view = new google.visualization.DataView(dataTable);
        for(i = 0; i < row.length; i++){
            var items = dataTable.getFormattedValue(i, i);
            if(items = "anti-social-behaviour"){
                console.log("if statement");
                view.setRows([selection[i].row]);
                table.draw(view, []);
            }
        }
    });

If anyone could spot the problem it wold be much appreciated. Thank you. 

-- 
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/groups/opt_out.

Reply via email to