jeudi 26 février 2015

D3.js Tree Expand All and Collapse All


I'm building a Tree using D3.js and what I am trying to do is add two buttons, Expand All and Collapse All to the top of the page like this.


Expand All and Collapse All in D3.js


When I click "Expand All", all the nodes should expand. And when I click "Collapse All", all the nodes should collapse to the root element.


Here's my current code http://ift.tt/1E1fZUm


But the problem is, it isn't working. Can somebody suggest how to make it work?





Aucun commentaire:

Enregistrer un commentaire