I have a crossfilter.dimension
. How do I get the current filter set on it (for example if it was set by a brush from a chart)?
Example:
dimension.filterRange([1,15]) // returns dimension
Given this filtered dimension, how do I get the values 1 and 15 out?
Stumbled on this old question because it is the top-voted unanswered crossfilter question, with 1k views!
This feature was contributed by Thomas Gillet in 1.4.5 as dimension.currentFilter()
The tough remaining problem: when you get beyond filterExact and filterRange, the more complex filters use filterFunction. You might be able to retrieve the function but functions are essentially opaque.
For example, if you are using dc.js, it will generate a filter function when
For this reason, if you're using dc.js, you should use chart.filters() instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With