Skip to main content
100%

Hierarchy examples: Cluster

✓ Published0🌍 Public
Rrainyrainyguo
Last edited Nov 22, 2020
Created on Nov 22, 2020

This example shows a hierarchical cluster layout, where a tree structure with nodes labeled A1, B1, B2, and C1–C3 is arranged into two levels of branches with straight connecting lines. The visualization uses d3.hierarchy and d3.cluster to compute node positions, then renders the result as an SVG with circles for nodes and line elements for links. The code applies a fixed size of 700 by 400 pixels to the layout, and the data is defined inline as a JavaScript object with nested `children` arrays. Node and link styling is set via external CSS classes.

AI-generated description
MIT Licensed

Similar vizzes