OK. You need to use the method getFilteredRows and apply it to your data 
object before calling chart.draw(data, options). Like this, 
getFilteredRows([{column: 
3, value: 42}, {column: 2, minValue: 'bar', maxValue: 'foo'}])

You can also do this with a dataView as shown below, all of this is from 
the https://developers.google.com/chart/interactive/docs/reference

If you want something dynamic and controlled by the user on the front-end, 
dashboard/categoryFilters are the best choice, or you can try to do it 
dynmaically by building on the below.

var data = new google.visualization.DataTable();
data.addColumn('string', 'Employee Name');
data.addColumn('date', 'Start Date');
data.addRows(6);
data.setCell(0, 0, 'Mike');
data.setCell(0, 1, new Date(2008, 1, 28));
data.setCell(1, 0, 'Bob');
data.setCell(1, 1, new Date(2007, 5, 1));
data.setCell(2, 0, 'Alice');
data.setCell(2, 1, new Date(2006, 7, 16));
data.setCell(3, 0, 'Frank');
data.setCell(3, 1, new Date(2007, 11, 28));
data.setCell(4, 0, 'Floyd');
data.setCell(4, 1, new Date(2005, 3, 13));
data.setCell(5, 0, 'Fritz');
data.setCell(5, 1, new Date(2007, 9, 2));

// Create a view that shows everyone hired since 2007.
var view = new google.visualization.DataView(data);
view.setRows(view.getFilteredRows([{column: 1, minValue: new Date(2007, 0, 
1)}]));
var table = new 
google.visualization.Table(document.getElementById('test_dataview'));
table.draw(view, {sortColumn: 1});

-- 
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/a83951b1-2875-4375-96e0-7796b7ab1ed7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to