Fork of Fork of React & D3 Starter
This example demonstrates a decoupled React and D3 integration for rendering a scatter plot of the Iris dataset. The visualization plots sepal length against petal length, using SVG circles to represent individual data points. The code showcases a scalable architecture pattern with separate modules for data loading, visualization logic, and axes rendering, highlighting how D3's `scaleLinear` and `axisLeft`/`axisBottom` APIs combine with React's `useRef` and `useEffect` hooks. The visualization selects SVG elements via D3's `select` and `join` methods to manage circle rendering.
AI-generated descriptionThis viz is a starter that demonstrates patterns used in real world projects in which complexity is anticipated to scale.
- Decoupled React & D3 integration
- Opening moves for scalable complexity
- Industry standard ES modules and JSX
- Copy-paste into existing projects
Any questions? Ask on Twitter!
Also viewable in: