D3 Course 8: Tree Visualization
✓ Published0🌍 Public
This example shows a node-link tree visualization of world geography, using a hierarchical dataset that groups countries by region and subregion. It displays the tree horizontally, with the root "World" on the left and its descendants branching to the right, each node labeled with its name. The visualization is built with d3.select, d3.json, d3.tree, d3.hierarchy, and d3.linkHorizontal to generate the layout and curved paths. Text labels are positioned and sized based on depth, and the entire SVG is wrapped in a zoomable group via d3.zoom. The styling uses a custom "Do Hyeon" font and an SVG path renderer.
AI-generated descriptionData Visualization with D3 course; Tree Visualization
<h3>Creating a Tree Visualization</h3> <table> <th align="left">Topics</th> <tr> <td> <ul> <li><b>Constructing a node-link tree vizualization</b></li> <li><b>Adding text labels to the nodes</b></li> <li><b>Using margin convention</b></li> <li><b>Tweaking label alignment and size</b></li> <li><b>Panning and Zooming</b> <li><b>Using a custom font</b></li> </ul> </td> </tr> </table>MIT Licensed