🌍 Public
Viewing a saved revision (read-only)
43923276654c4f4ab9207eb72adbe266
Simple Circle Pack (d3 v4; CSV; 50 Lines)
This example demonstrates a circle packing visualization that encodes hierarchical data as nested circles, where the area of each circle represents a numeric size value. The visualization shows a dataset of car acquisition and trading history, with parent-child relationships defined by the CSV structure. The implementation uses d3.v4's `d3.stratify` to process the tabular data, `d3.hierarchy` with a size summation function to compute the tree structure, and `d3.pack` to generate the circle layout. Circles are rendered as SVG elements with white strokes and semi-transparent blue fills.
AI-generated descriptionReact Starter code.