Skip to main content
100%

Fork of React & D3 Starter

✓ Published0🌍 Public
GGuna
Last edited Feb 16, 2023
Created on Feb 16, 2023
Forked from React & D3 Starter

This example demonstrates a decoupled React & D3 starter, showing a classic scatter plot of the Iris dataset. It uses the `viz` function to create the plot, drawing circles for each data point using `d3.scaleLinear` for x and y axes, and `d3.extent` to compute the domain. The `axes` function uses `d3.axisLeft` and `d3.axisBottom` to add the axis elements. The rendering is done in SVG, with React managing the wrapper component and D3 handling the imperative visualization logic. The code includes commented-out experiments with rectangles and masks, showing the starter's flexibility for scaling complexity.

AI-generated description

This 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:

MIT Licensed

Similar vizzes