Ingenious, though I agree, there should be some way to override the default set of options for the CategoryFilter. Setting an explicit list should be a relatively easy feature to add.
On Thu, Jun 29, 2017 at 2:39 PM, 'Ray Thomas' via Google Visualization API < [email protected]> wrote: > It's done and was much easier than I first thought. I wanted to keep the > original datatable so needed to create a new dataview, I thought I might > have to step through the datatable in a loop to create a new dataview but > after re-reading the docs found I didn't have to. > > I added my own select dropdown with a listener for changes in that and > then used setRows and the "test" property of getFilteredRows to get the > rows I wanted to put in the dataview. > > setRows - https://developers.google.com/chart/interactive/docs/ > reference#DataView_setRows > getFilteredRows - https://developers.google.com/chart/interactive/docs/ > reference#DataTable_getFilteredRows (but the "test" property is not fully > explained and it took a bot of experimentation to see how to use it) > > My amended code - https://jsfiddle.net/brisray/9vj7r014/6/ > > -- > 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 google-visualization-api@ > googlegroups.com. > 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/d3d3edf0-535e-4bd9-afb2- > 23827544227e%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/d3d3edf0-535e-4bd9-afb2-23827544227e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- 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/CAOtcSJNxdVmbvgSi2CANA77z_x%3D3_bk6i5XHU-Qm%2BRUY1PFkXg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
