Zoomable Circles with D3-Zoom
✓ Published2🌍 Public
Six colored circles on a light green background form the focus of this example, which demonstrates how d3-zoom adds pan and zoom interactions. The visualization shows static circles positioned at fixed coordinates, with the zoom behavior updating a transform state that is applied to a group element. Dragging and scrolling the mouse translates and scales the entire circle collection smoothly. The implementation uses `d3.zoom` and binds its `zoom` event to update the group’s `transform` attribute, while the circle data remains unchanged, highlighting how the zoom layer operates independently of the underlying marks.
AI-generated descriptionA demonstration of how to add panning and zooming using d3-zoom.
Challenge
- Use this technique to add zooming to a visualization you created, such as a map
MIT Licensed