🌍 Public
Viewing a saved revision (read-only)
f1a54d5346814c9f91989c92b40752a4
CV: Responsive Clickable Circles
This example shows a set of five circles arranged diagonally across a responsive SVG canvas. Clicking any circle toggles its state, changing its fill from black to white and adding a thick black outline. The visualization uses React state to track the selected circle and D3 v7 scales to map fixed data coordinates to the container’s dynamic width and height. A ResizeObserver hook measures the container, triggering a re-render of the circles via D3’s select and join pattern.
AI-generated description