Search code examples
javascriptdc.jscrossfilter

Simple List filter & Search filter with dc.js?


Would someone be able to give an example of how to create a list box filter with dc.js? as well as a search box filter?

I'm trying to create a dashboard with dc.js and instead of filtering through all distinct values using a bar chart, I'm trying to make a listbox with buttons. Is this easy to do?

Similarly, what would be the simplest way to create a search box to filter the data?

Any guidance would be much appreciated!


Solution

  • List box

    Sometimes the names of UI elements are ambiguous, but I think you're referring to a select widget, which is available in dc.js 2.1+ as dc.selectMenu.

    Demo

    Search box

    Pull Request #936 implements this. Please try it out and leave your review on the PR.

    It's available with the current latest dc.js in this branch.