3 ms·
Do you realise that this is essentialy Mike Bostock's reference implementation of a Collapsible Tree [1]? Why re-distribute it as a separate repository? Rebec
by jamessb 9y ago
Do you realise that this is essentialy Mike Bostock's reference implementation of a Collapsible Tree [1]?
Why re-distribute it as a separate repository?
Rebeca Ricks added tooltips, but you haven't generalised these: the code in your repo still generates this text using .Data and .Purpose attributes of the data objects representing the leaves [2], which won't exist for general tree objects.
[1]: https://bl.ocks.org/mbostock/4339083 https://bl.ocks.org/mbostock/4339083
[2]: https://github.com/shawwn/d4tree/blob/master/js/script.js#L72 https://github.com/shawwn/d4tree/blob/master/js/script.js#L7...
- shawn 9y agohttp://9front.org/img/freesoftware.gif http://9front.org/img/freesoftware.gif Thanks! :) I did this mostly for the fun of it, but it's nice to know the source. The styling on Mike's tree is much nicer. It's quite handy to have zooming and tooltips. The zooming is a little rough, but overall this seems like a nice way to explore huge amounts of hierarchical data. My overall aim is to make an interactive bundle explorer: https://i.imgur.com/Ww0ARCS.png https://i.imgur.com/Ww0ARCS.png Graphviz is nice, but it's not interactive. What you really want is to attach a ton of information to each node, hidden by default. Tooltips are a small but promising step towards that. It doesn't seem like this library can handle circular dependencies though. Anyone know of something along these lines that can handle arbitrary cycles? DOT graphs try to display all the nodes at once, but it seems like the Collapsible Tree strategy could be applied to circular graphs: just let the user click on the edges they want to explore, and elide the rest. Then indicate which edges are "interesting" (lots of children, or children with significant effects), so that users aren't randomly stepping through a huge mostly-hidden graph. I'd love to find something performant enough to display your entire filesystem as an explorable tree, but that'd be quite a challenge.