Simple horizontal tree diagram using v4
✓ Published0🌍 Public
Dd3noob
Last edited Nov 26, 2019
Created on Jul 29, 2016
A horizontal tree diagram shows hierarchical data with a top-level node branching into child nodes, with internal nodes labeled on the left and leaf nodes on the right. Built with d3.js v4, it uses the `d3.tree` layout and `d3.hierarchy` to compute node positions from a hard-coded JavaScript object. The SVG output renders circles for nodes, Bézier curve paths for links, and text labels styled via CSS. The code demonstrates standard d3 v4 tree-diagram APIs including `nodes.descendants()` and `node.append()`.
AI-generated descriptionThis is a simple horizontal tree diagram written with d3.js v4. It is based on the vertical version here
This is designed to be used as part of documenting an update to the book D3 Tips and Tricks to version 4 of d3.js.
mit Licensed