J. Forsberg
J. Forsberg

Reputation: 13

DC.js + Crossfilter set up active item of the chart after manual filter

I have a simple DC.js bar charts with crossfilter -http://jsfiddle.net/feLuyb9b/1/

I needed to filter it by default 'Brooklyn', for example. I do it with the neighborhoodDimension.filter('Brooklyn'); The question is how to select by default item 'Brooklyn' for this chart after filtering?

I will be glad for any help with it.

Upvotes: 1

Views: 505

Answers (1)

Ethan Jewett
Ethan Jewett

Reputation: 6010

If you're using dc.js, just remove your filter on the Crossfilter dimension and filter on the chart instead:

rowChart.filter("Brooklyn")

dc.js will handle applying the necessary Crossfilter filters and updating your charts.

Upvotes: 2

Related Questions