Jjayedmohammadbarek@my.unt.edu
Last edited Nov 14, 2026
Created on Nov 14, 2026
This example shows a scatterplot of five circles positioned according to x,y coordinates loaded from a CSV file. Clicking a circle toggles its appearance from black to white with a black outline. The visualization uses React state to track the selected circle and a ResizeObserver hook to make the SVG responsive. D3's `scaleLinear` maps the fixed coordinate domain to the container dimensions, and the `join` pattern updates the circle elements.
AI-generated descriptionReact D3 Starter
A minimal React + D3 starter for building interactive data visualizations.
Files
index.html— page shell and import map (React + D3 from a CDN).index.jsx— mounts the<App />component.App.jsx— loadsdata.csvand renders the visualization.viz.js— D3 render entry point.renderCircles.js— draws the circles.useContainerDimensions.js— tracks the container size.data.csv— sample data.styles.css— page styles.
Getting started
Edit App.jsx to change what gets rendered; the preview updates live as you type.
Comments
Sign in to join the discussion.