🌍 Public
Viewing a saved revision (read-only)
e2b69bd21fc34ae9b4f44cd7c19fe6ca
Fork of Circles with D3
This example shows the classic Iris dataset as a scatterplot, with each point colored by species (setosa, versicolor, virginica) and positioned by sepal length and width. Clicking a circle highlights its selection with a black stroke and updates the React state. The visualization uses D3’s `scaleLinear` and `extent` for axes, and React’s `useRef` and `useEffect` to manage the SVG lifecycle. Data is loaded via `d3.csv` from a GitHub gist, and rendering is handled through D3’s `join` pattern.
AI-generated descriptionReact with D3 visualization