Zoomable and Draggable Circles with D3-Drag and D3-Zoom
This example demonstrates draggable and zoomable circles, where users can reposition individual circles by dragging and pan or scale the entire scene via zoom interactions. It visualizes six colored circles, each with a fixed position, radius, and fill color. The implementation uses D3’s `drag` and `zoom` behaviors, with the state managed through a `setState` callback that updates circle coordinates during drag and applies a transform to a parent group element during zoom. The rendering uses D3’s `select`, `selectAll`, `join`, and `attr` methods, with a light green background.