Skip to main content
100%

Simple Circle Pack (d3 v4; CSV; 50 Lines)

✓ Published0🌍 Public
Oocean1225
Last edited Feb 24, 2020
Created on Feb 24, 2020
Forked from React Starter

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 description

React Starter code.

MIT Licensed

Similar vizzes