Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using dimensions with arrays in dc.js/crossfilter

Crossfilter supports dimensions with arrays since version 1.4.0-alpha.06 https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_with_arrays

Is it possible to exploit this functionality in dc.js?

I haven' found any examples yet... I am aware of the method described in Is there a way to tell crossfilter to treat elements of array as separate records instead of treating whole array as single key?, but that works with earlier versions of crossfilter too (it does not make use of the new functionality).

like image 735
emiguevara Avatar asked Jan 18 '17 13:01

emiguevara


1 Answers

With help from comments above, I managed to get this working, very simple indeed if you use the right version of crossfilter (1.4.0). Works fine with rowChart() and pieChart().

I made a an example bl.ock based on previous approaches: http://bl.ocks.org/emiguevara/4bd152a8828f6b31270702d97dc0133d

like image 76
emiguevara Avatar answered Sep 23 '22 02:09

emiguevara