Skip to main content
100%

Fork of Zoomable Circles with D3-Zoom

✓ Published0🌍 Public
00pal
Last edited Nov 21, 2024
Created on Nov 21, 2024

This example demonstrates a zoomable scatterplot of colored circles, where users pan and zoom the entire visualization through mouse or touch interactions. The code uses D3’s `zoom` behavior and applies the resulting transform to a group element containing the circles. The circles are defined with hardcoded positions, radii, and fill colors, rendered with SVG elements. It showcases a reusable pattern for integrating d3-zoom with state management, as the transform is stored via a `setState` callback.

AI-generated description

A 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

Similar vizzes