Skip to main content
100%

Fork of Zoomable Circles with D3-Zoom

✓ Published0🌍 Public
SStephen HC Lin
Last edited Mar 22, 2024
Created on Mar 22, 2024

This example shows a zoomable bubble chart of six colored circles of varying sizes and positions. It demonstrates how to add pan and zoom interactions to a visualization using the D3.js library. The code uses `d3.zoom` to handle user input and applies the zoom transform to a group element containing the circles. Data is hardcoded as an array of objects with x, y, radius, and fill color properties. The visualization updates its state with the current transform, allowing for smooth interactive exploration of the circular layout.

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