🌍 Public
Viewing a saved revision (read-only)
51e02a9b4997496898c4f3e4f0e8e9b4
zoomable circles with d3 zoom
This example shows a set of colored circles positioned on a light green background, which can be zoomed and panned through mouse or touch gestures. The visualization uses D3's zoom behavior to apply a transform to a group element, updating the state object with each zoom event. The circles are rendered with D3 selections, each assigned fixed coordinates, radii, and fill colors from an inline data array. The code leverages the d3.zoom API and the state management pattern to persist the current transform across re-renders.
AI-generated description