🌍 Public
Viewing a saved revision (read-only)
44fde8882c4b4385a950dda0dc0628b4
Fork of Fork of Circles with D3
This visualization presents a set of colored circles overlaid on vertical bars, with clickable circles that highlight their selection with a black stroke. Data consists of 14 items with x, y, radius, and fill color properties. The code uses React hooks to manage the selected circle's ID and D3 v7's `select` and `join` methods to bind data and render SVG elements. Clicking a circle triggers `setSelectedId`, causing a re-render that updates the stroke attribute on the selected circle.
AI-generated description