Skip to main content
100%

Zoom + Pan

✓ Published0🌍 Public
663anp3ca
Last edited Nov 13, 2018
Created on Nov 13, 2018

This example demonstrates interactive zooming and panning on a simple coordinate grid with axes, controlled both by mouse gestures and on-screen buttons. The visualization uses d3.behavior.zoom to link the scale domains to user input, with the axes redrawn on each zoom event. Button clicks trigger animated transitions that adjust the zoom scale or translate the view, recalculating the center point in data space to maintain focus. The rendering uses SVG with d3.v3, and the code explicitly handles coordinate conversion between screen and data space via the zoom object's scale and translate properties.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/suhailsulu/'>suhailsulu</a>'s block: <a href='http://bl.ocks.org/suhailsulu/3176f6d8ad5a09924e39d064fbfd02c7'>fresh block</a>

mit Licensed

Similar vizzes