Viewing a saved revision (read-only)
IeERUCxocSi6meLqsBo_m
Five circles plotted from a small CSV file sit against a rainbow gradient background, each assigned a distinct color from D3's `schemeTableau10`. Clicking a circle enlarges it, applies a thicker stroke, and dims the others, while clicking again toggles selection off. The visualization uses `scaleLinear` for x/y positioning, `scaleOrdinal` for color mapping, and React state via `useState` to track the selected circle ID. A `ResizeObserver` hook feeds container dimensions into D3's `selection` API to re-render responsively.
AI-generated descriptionFunky Gradient Bubbles
Colorful glossy balls bounce around the viewport, collide with one another, and respond to clicks. Select a ball to highlight it. Drag any ball and release it to flick it with momentum; balls bounce off the container edges.
The simulation observes its container with ResizeObserver, adapts to dimension changes, and keeps ball positions in pixel coordinates.
Five additional balls extend the size range from 5 to 200 pixels, with intermediate sizes spaced roughly logarithmically.
References
- Visualization 23b4f01cbe204d51b77b2de6498ee568 — bouncing-ball motion and collisions.
- Visualization 91e9b84cb9d94cd69b58cc680ebb6a63 — draggable balls and flick momentum.