🌍 Public
Viewing a saved revision (read-only)
74c1c3d2b61d4b1a95b548a3603dbe42
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