Skip to main content
100%

Tree

✓ Published0🌍 Public
CCoola85
Last edited Jun 6, 2018
Created on Jun 6, 2018

This example shows a simple hierarchical family tree with three generations, drawn in a bottom-to-top orientation using the D3.js v3 library. It demonstrates the `d3.layout.tree` layout and `d3.svg.diagonal` for rendering curved link paths, while nodes appear as circles with text labels for each person’s name. The data comes from a local `graph.json` file containing a nested “Father,” “Son,” and grandchildren structure. The SVG output is styled with minimal CSS, using a light gray border and black links, and the layout is positioned within a fixed margin and size.

AI-generated description

In response to a Stack Overflow question, Tree drawing orientation.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3184089'>Tree Layout Orientations</a>

gpl-3.0 Licensed

Similar vizzes