Skip to main content
100%

Circles with D3 and React

✓ Published2🌍 Public
BBismark Kofi Owusu Sarfo
Last edited Sep 10, 2025
Created on Sep 10, 2025

The visualization displays fourteen circles of varying radii and colors positioned across a 960-by-500 SVG canvas, with each circle’s center, size, and fill defined by a static array of objects. Built with React 19 and D3 v7, the app uses a `useRef` hook to select the SVG element and applies a D3 `select` and `.join` operation to bind the data array to circle elements. The code sets each circle’s `cx`, `cy`, `r`, and `fill` attributes directly from the data source, showing a straightforward declarative mapping of data to SVG shapes.

AI-generated description
MIT Licensed

Similar vizzes