Skip to main content
100%

Circles with D3 and React

✓ Published3🌍 Public
CCurran Kelleher
Last edited Sep 4, 2025
Created on Sep 4, 2025

This example renders a scatterplot of 14 colored circles on an SVG canvas using React and D3. Each circle’s position, radius, and color come from static data defined in a separate JavaScript module. The visualization integrates React’s `useRef` and `useEffect` hooks with D3’s `select` method to bind data and create circle elements via `join`. The D3 v7 code applies `attr` setters for cx, cy, r, and fill properties.

AI-generated description
MIT Licensed

Similar vizzes