Dc-sunburst, dc-Menuslect, dc-Non interactive graph

▼魔方 西西 提交于 2021-02-10 05:51:50

问题


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:


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.



来源:https://stackoverflow.com/questions/50645419/dc-sunburst-dc-menuslect-dc-non-interactive-graph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!