Viewing a saved revision (read-only)
GDpg9xqaUzfPDzbnOTd9K
This example shows five circles arranged across a scatterplot layout, where clicking a circle toggles its fill from black to white with a black stroke to indicate selection. The visualization loads x and y coordinates from a local CSV file, scales them to the container’s dimensions using d3.scaleLinear, and renders the circles with D3’s selection and join methods. React manages the component state, including the selected circle ID, while a ResizeObserver tracks the container’s size to update the SVG’s width and height dynamically.
AI-generated description