React + D3 Hooks template
✓ Published0🌍 Public
This visualization displays a scatterplot of student eye colors, with each circle’s position and size derived from the red, green, and blue components of the eye color. The example shows how to combine React hooks with D3 v5 by using a custom `CirclePlot` component that wraps D3 logic in a `useEffect` hook. It uses `d3.json` to load data from a GitHub gist, filters for valid hex colors, and applies `d3.scaleLinear` with `d3.easeBounce` transitions to animate the circles as they scale.
AI-generated descriptionReact + D3
Purpose
To provide an understandable React + D3 template. This version uses the new React hooks.
Trying to adapt using this
Questions
- How can a wrapped element get the id of the wrapper element?
- How does it work when we want to update the graph
MIT Licensed