Skip to main content
100%

Testing Zoom

✓ Published0🌍 Public
Rrobinjohn.inc@gmail.com
Last edited Jun 4, 2024
Created on May 28, 2024

This example demonstrates interactive panning and zooming on a set of colored circles arranged in a scatter-plot-like layout. The visualization uses the `d3` library’s `zoom` API to handle user gestures, and the SVG `transform` attribute is updated dynamically to reflect the current view state. A custom data array defines the circles’ positions, sizes, and fills, and a tooltip is attached via `tip.show` and `tip.hide` on mouseover, though no tooltip content is defined here. The rendering relies on the standard `select` and `join` methods to manage SVG elements efficiently.

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