Skip to main content
100%

Simple vertical tree diagram using v6

✓ Published0🌍 Public
Dd3noob
Last edited Sep 12, 2020
Created on Sep 12, 2020

This simple vertical tree diagram displays hierarchical data with a root node branching into two levels, using circles for nodes and curved paths for links. The visualization is rendered as SVG with D3.js v6, using the `d3.tree()` layout and `d3.hierarchy()` to structure the hard-coded data, then appending groups and paths via `selectAll().enter()`. Node labels are offset above or below circles depending on whether they have children, and internal text includes a white shadow for readability. The code sets explicit margins and dimensions to position the tree within the viewport.

AI-generated description

This is a simple vertical tree diagram written with d3.js v6.

This is designed to be used as a starting point for further development as part of documenting an update to the book D3 Tips and Tricks to version 6 of d3.js.

mit Licensed

Similar vizzes