2
votes

I'm new on dc.js and I have some questions about flexibility of dc.

First, I have looked for answers but haven't yet found any of them.

1) I'm using dc.sunburst chart. I was wondering if it was possible to create Zoomable sunburst as it is actually the case with d3.js. If yes, can you provide a piece of code please..?

2) I'm using crossfilter for interacting several graphs together. However I would like that one of them would not be possible to filter with. I mean that it updates with his dimension/group when filtering on other chart but that filtering other chart clicking on it would be impossible. Any ideas ?

Like: dc.rowChart().on("click", Do not filter)

3) I want to create a dropdown (using dc.menuSelect and crossfilter) on a two-dimension. When I create this chart the dropdown is like:

  • Bâle, A1
  • Bâle, A2
  • ...
  • Bâle, N2

And I would like something more like:

  • Bâle
    • A1
    • A2
    • ...
    • N2
  • Zürich
    • A1
    • ...
    • N2

Thanks for your answer !!

1
These are three unrelated questions - better to ask three questions, especially since it's unlikely that one person will know the answer to all three. Or for general free-form conversation, the dc.js users group is a better place to ask.Gordon
As for a zoomable sunburst, it doesn't look like this was implemented in dc.sunburstChart but maybe it would not be too hard to add. Would you expect the chart also to filter to the clicked slice when the sunburst chart zooms in?Gordon
Yes ! Actually I would like something like this: bl.ocks.org/mbostock/4063423 Zoomable and able to filter to the clicked slice... But with dc.sunburst instead of d3.js... Thanks for reply !Brice Repond

1 Answers

1
votes

I'll answer just question number 2, since I know the answer to that one.

dc.js does not provide an option to disable the click behavior for the row chart. However, in this case you can just override the handler:

rowChart.onClick = function() {};

The greatest strength of dc.js is also its greatest weakness: there have been a lot of contributors, which means the library has a ton of features. However, the interface may not always be consistent. In this case, many of the charts can have filtering disabled by calling .brushOn(false) - but not the row chart!

At the same time, dc.js is designed with an open architecture and there is almost always a way to workaround or patch in extra features.