I am working with the Collapsible Force Layout in D3 and I need a way to start the graph fully collapsed (where I can expand the graph node by node). My graph is relatively large and it lags the screen with the amount of information.
I figured calling the click() function on all nodes in the graph would collapse the graph to a single point .There are examples on click events, but I am not versed enough in Javascript to know how or where to put them in the code to implement them.
This answerthat has been provided before doesn't seem to work when added between the root=json and the update(); lines. Please explain where to add it if it does.