Christoph
Christoph

Reputation: 968

dc.js - Defining your own filter callback

When you interact with one of the graphs DC takes whatever it is you click on (row, pie slice, etc) and passes that into crossfilter to get it to filter filter those records having that value. Is there a way to tell DC.js that I'd want to use a custom function instead?

On this page https://github.com/square/crossfilter/wiki/API-Reference#dimension_filter it shows that you can do this but I know that DC.js abstracts that away. I've looked around the DC.js API but wasn't able to find anything along these lines. Is it possible?

thnx,
Christoph

Upvotes: 2

Views: 159

Answers (1)

Christoph
Christoph

Reputation: 968

Something along the lines of what I'm looking for is by using the .filterHandler() function on the chart.

https://dc-js.github.io/dc.js/docs/html/dc.baseMixin.html#filterHandler__anchor

Upvotes: 1

Related Questions