AdeelK93 / collapsibleTree

Create Interactive Collapsible Tree Diagrams in R using D3.js
https://adeelk93.github.io/collapsibleTree/
158 stars 41 forks source link

[Feature Request] Could we make the tree fully open by default with a parameter? #12

Closed caleblareau closed 7 years ago

caleblareau commented 7 years ago

I'm trying to render a heavily nested tree with ~100 total nodes. Specifically, I'm also building a shiny app to show a variable color annotation on each node.

The package is awesome for doing exactly this, but my one annoying user experience so far is that I don't see an option to keep which nodes are "open" when re-rendering the tree. Alternatively, it'd be great to have some parameter that displays the full tree initially, and then users can collapse nodes back down as needed.

Any thoughts on this?

AdeelK93 commented 7 years ago

Thanks for the suggestion! I've added an option called collapsed to the function in the github version, how does that work for you?

caleblareau commented 7 years ago

Perfect. Thanks @AdeelK93!!