Get selected crossfilter data

1,364 views
Skip to first unread message

strangeapparition

unread,
Nov 14, 2013, 5:23:01 PM11/14/13
to dc-js-us...@googlegroups.com
I'm using dc.js to create four charts that can be filtered, and then outputting that filtered data in a table. The dc.js table is not sufficient enough for my project, so I wanted to find a way to get the filtered data from the crossfilter part, and use it with a different table of a different library.

How can I get an array of the filtered data so I can assign it to a variable and use it with another library?

Robert Monfera

unread,
Nov 15, 2013, 5:45:53 AM11/15/13
to dc-js-us...@googlegroups.com
As a prerequisite to charting with dc.js, you have already set up crossfilter dimensions. For example, you have a timeline chart, using a crossfilter dimension you created and bound to the javascript variable 'date'. In this case you can do just this:
date.top(Infinity) 
to get all dimension values in an array, corresponding to your current selection.
Reply all
Reply to author
Forward
0 new messages