Reputation: 8584
I'm new at d3-js and I want to use "d3.js Dendrogram" in order to display an organization tree. Thanks to the demo, I could display all of hierarchy. However, I can not find how to toggle visibility of nodes when I click upper nodes. Does anyone knows any samples or references? Any help will be appreciated.
http://mbostock.github.com/d3/ex/cluster.html
Upvotes: 2
Views: 3367
Reputation: 2622
In my case I ended using a collapsible tree instead of dendrogram for almost the same purpose. See http://bl.ocks.org/mbostock/4339083
Upvotes: 0
Reputation: 2333
I believe "The Power Rank" example can help you with this. This uses a radial tree, which I believe is nothing more than a radial Dendrogram, to lay things out. You'll notice that all nodes in a hierarchical path can be selected at the same time.
I believe it has to do with how you tag each node with the appropriate attribute (an ID or Class) that you can select by, on mouse over or on mouse click.
I hope it helps.
Good Luck,
Frank
Upvotes: 2