Fork of Fork of Fork of Fork of React & D3 Starter
✓ Published1🌍 Public
SSanjayRamaSwamyAdla@my.unt.edu
Last edited Mar 30, 2026
Created on Mar 30, 2026
Forked from Fork of Fork of Fork of React & D3 Starter
This example shows a reusable scatter plot of study hours versus exam scores, using a compact D3 v7 script embedded in an HTML page. It displays seven data points as steelblue circles on an SVG canvas, with linear scales mapping hours to x-positions and scores to y-positions, plus labeled axes. The code defines a `scatterPlot` function that appends an SVG, computes scales via `d3.scaleLinear`, draws axes with `d3.axisBottom` and `d3.axisLeft`, and binds data using `selectAll().data().enter()`. The repository also includes a separate React component (index.jsx) that uses `useRef` and `useEffect` to integrate D3 selections, though the plot itself runs standalone.
AI-generated descriptionMIT Licensed