Best filter to de-selet a specific row and display graphs using the rest of the data

89 views
Skip to first unread message

Priyanka

unread,
Sep 6, 2012, 6:43:53 AM9/6/12
to google-visua...@googlegroups.com
Hi,

I have a data table that has more than 1000 rows, i need to have a way using which i should be able de-select specific row/rows and display all the charts with the remaining data. 

In the example link shown below pointed by Asgallant, suppose i want to have a way where i can deselect names "John","Aaron" from "Name" column. Then the pie chart and table chart should have data only for rows where "Name" column has values "Micheal", "Jessica", "Margareth" and "Miranda"


Using CategoryFilter options there are ways to select specific thing (through drop-down selection or through typing), but here i want the reverse (to deselect some thing and get the charts dynamically update removing the data for selected row)

Can anyone please help me in this.

Thanks for your time!

asgallant

unread,
Sep 6, 2012, 10:00:39 AM9/6/12
to google-visua...@googlegroups.com
I can see two approaches to the problem without building your own control.  Which you choose depends largely on how many possible entries there will be in your equivalent to the "Names" column.  If it's a relatively small number (say < 10), then I would suggest using a category filter with all of the names preselected in the starting state.  Then, users can deselect names from the list to filter out the rows, like this: http://jsfiddle.net/asgallant/zNccF/8/

If, on the other hand, your list of possible entries can be very large, then I would recommend going the other direction, and building a CategoryFilter that excludes the selected entries from the dashboard, like this: http://jsfiddle.net/asgallant/zNccF/9/ 

Priyanka

unread,
Sep 7, 2012, 5:53:47 AM9/7/12
to google-visua...@googlegroups.com
Hi Asgallant,

Thankq for the workaround. in the link "http://jsfiddle.net/asgallant/zNccF/9/ " i am trying to have dependency between both the controls. Based on what is selected for "Gender" categoryFilter, only those corresponding names should appear in "Exclude these names" dropdown. 

When i use bind function like below, it is not allowing to use multiple selection for "Exclude these names" dropdown. When the second one is selected, the first one is getting deselected automatically. 
 dash.bind([slider][categoryPicker2]);
 dash.bind([categoryPicker2], [pie, table]);
 dash.draw(data); 

Thanks in advance.

asgallant

unread,
Sep 7, 2012, 10:24:29 AM9/7/12
to google-visua...@googlegroups.com
I'm not sure that's a good idea.  You would create a circular reference where the gender control controls the exclusion control, and the exclusion control controls the gender control.  It would be possible, then, to completely remove data from the system, so it can never be displayed.  Imagine this scenario: you use the gender control to select a gender, which removes all of the opposite gender from the exclusion control, which removes them from the gender control, so that gender doesn't even show up in the list any more.

You can have a chain of controls leading ultimately to a chart, but you cannot have controls operate on each other mutually.

If you want to change this so that the slider and gender controls feed the exclusion control and charts, and have the exclusion control remove data just from the charts, then that should be doable.

Priyanka

unread,
Sep 13, 2012, 3:53:28 AM9/13/12
to google-visua...@googlegroups.com
Hi Asgallant,

Even that will help i.e., If we are able to do this so that the slider and gender control feeds the exclusion control and charts, and have the exclusion control remove data just from the charts, then that will be of great help! 

Thanks

asgallant

unread,
Sep 13, 2012, 12:06:03 PM9/13/12
to google-visua...@googlegroups.com
It takes a bit of hackery to make it work, but here you go: http://jsfiddle.net/asgallant/zNccF/11/ 

Priyanka

unread,
Sep 14, 2012, 6:41:44 AM9/14/12
to google-visua...@googlegroups.com
This worked. Thankyou for the help !!

asgallant

unread,
Sep 14, 2012, 10:49:18 AM9/14/12
to google-visua...@googlegroups.com
You're welcome.
Reply all
Reply to author
Forward
0 new messages