🌍 Public
Viewing a saved revision (read-only)
d7d658d7563140f9a4713d996b354c52
Fork of Zoomable and Draggable Circles with D3-Drag and D3-Zoom
AAl Piepho
Last edited Mar 4, 2024
Created on Mar 4, 2024
This example demonstrates draggable, zoomable circles rendered as an SVG visualization. Users can drag individual circles to reposition them and zoom or pan the entire scene using mouse or touch interactions. The visualization uses D3’s `drag` and `zoom` behaviors, with a state management pattern that updates circle coordinates and the group transform on interaction. Initial circle positions, sizes, and colors are hardcoded as static data, while the `d3.select`, `join`, and `attr` methods handle dynamic rendering and updates.
AI-generated descriptionDraggable circles using d3-drag.