filter for getFilteredRows using multiple values for the same column

1,558 views
Skip to first unread message

Bill Shetti

unread,
Aug 22, 2014, 2:34:56 AM8/22/14
to google-visua...@googlegroups.com
Hi,

Is there a way to filter on multiple values for a singular column in the getFilteredRows?

For instance:

getFilteredRows([{column: 3, value: 42}, {column: 3, value: 50}, {column: 2, value: 'bar'])

I am looking to have the filter effectively provide rows where 

column 3 value is 42 OR 50 
AND
column 2 value is 'bar'

Is this possible?

Bill

Sergey Grabkovsky

unread,
Aug 22, 2014, 10:00:11 AM8/22/14
to google-visua...@googlegroups.com
You can use a filter with a 'test' function. Here is an example: http://jsfiddle.net/0h7fxsLu/

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Andrew Gallant

unread,
Aug 23, 2014, 2:47:48 PM8/23/14
to google-visua...@googlegroups.com
Is that new functionality, Sergey?


On Friday, August 22, 2014 10:00:11 AM UTC-4, Sergey wrote:
You can use a filter with a 'test' function. Here is an example: http://jsfiddle.net/0h7fxsLu/

On Fri Aug 22 2014 at 2:34:58 AM Bill Shetti <bills...@gmail.com> wrote:
Hi,

Is there a way to filter on multiple values for a singular column in the getFilteredRows?

For instance:

getFilteredRows([{column: 3, value: 42}, {column: 3, value: 50}, {column: 2, value: 'bar'])

I am looking to have the filter effectively provide rows where 

column 3 value is 42 OR 50 
AND
column 2 value is 'bar'

Is this possible?

Bill

--
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 google-visualization-api+unsub...@googlegroups.com.

Jon Orwant

unread,
Aug 23, 2014, 6:32:17 PM8/23/14
to google-visua...@googlegroups.com
It is new, and will be documented shortly.

Jon


To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.

Henrik Aronsson

unread,
Jun 16, 2015, 9:49:08 AM6/16/15
to google-visua...@googlegroups.com
Hi Jon,

Long time since this post, sorry for maybe bumping it up. Just requesting some addition of documentation of this function "test" to be added on the charts API page, more than just mentioning like it is now.
Very useful function!


On Sunday, August 24, 2014 at 12:32:17 AM UTC+2, orw...@google.com wrote:
It is new, and will be documented shortly.

Jon
On Sat, Aug 23, 2014 at 2:47 PM, Andrew Gallant <agal...@google.com> wrote:
Is that new functionality, Sergey?


On Friday, August 22, 2014 10:00:11 AM UTC-4, Sergey wrote:
You can use a filter with a 'test' function. Here is an example: http://jsfiddle.net/0h7fxsLu/

On Fri Aug 22 2014 at 2:34:58 AM Bill Shetti <bills...@gmail.com> wrote:
Hi,

Is there a way to filter on multiple values for a singular column in the getFilteredRows?

For instance:

getFilteredRows([{column: 3, value: 42}, {column: 3, value: 50}, {column: 2, value: 'bar'])

I am looking to have the filter effectively provide rows where 

column 3 value is 42 OR 50 
AND
column 2 value is 'bar'

Is this possible?

Bill

--
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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.

bjohnston370

unread,
Sep 1, 2015, 4:53:47 AM9/1/15
to Google Visualization API
+1 for Henrik's request.

Frank Wiebenga

unread,
Jun 8, 2016, 12:13:25 PM6/8/16
to Google Visualization API
Bumping again, really poor documentation

Mohit Bansal

unread,
May 19, 2017, 3:29:50 PM5/19/17
to Google Visualization API
How can I pass list of values (like a comma separated values) to test function.


On Friday, August 22, 2014 at 9:00:11 AM UTC-5, Sergey wrote:
You can use a filter with a 'test' function. Here is an example: http://jsfiddle.net/0h7fxsLu/

On Fri Aug 22 2014 at 2:34:58 AM Bill Shetti <bills...@gmail.com> wrote:
Hi,

Is there a way to filter on multiple values for a singular column in the getFilteredRows?

For instance:

getFilteredRows([{column: 3, value: 42}, {column: 3, value: 50}, {column: 2, value: 'bar'])

I am looking to have the filter effectively provide rows where 

column 3 value is 42 OR 50 
AND
column 2 value is 'bar'

Is this possible?

Bill

--
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 google-visualization-api+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages