TnT Tree
This interactive phylogenetic tree visualizes evolutionary relationships from a Newick-format string, using the TnT Tree library built on D3 v3. It shows a collapsible cladogram where circular and triangular nodes indicate expanded or collapsed subtrees, with a button toggling between vertical and radial layouts. Hovering over a leaf highlights the path to the root by adding a dashed red class to relevant link elements. The code explicitly uses `tnt.tree.parse_newick`, `tnt.tree.layout.vertical/radial`, and D3 selection methods like `classed` and `on` for interactivity.
AI-generated descriptionBuilt with blockbuilder.org
This example is forked from Collapsible nodes.
This framework is awesome but i still feel very strange while using d3.selection.classed() function, for some of the path selections can not attach one specific class name. Very odd behavior!
More information relate to Newick Format please reference Wikipedia and TnT tree API.
forked from <a href='http://bl.ocks.org/1Cr18Ni9/'>1Cr18Ni9</a>'s block: <a href='http://bl.ocks.org/1Cr18Ni9/66cf9dd9093b17f3204632d155596840'>TnT Tree</a>