Skip to main content
100%

van Wijk Smooth Zooming

✓ Published0🌍 Public
FFrissAnalytics
Last edited Oct 11, 2018
Created on Oct 11, 2018

This example demonstrates smooth zooming transitions between two positions and scales over a static hexbin mesh. The visualization uses `d3.interpolateZoom` to interpolate between two center coordinates and zoom levels, with an SVG `g` element animated via `transition.attrTween`. The code renders a hexagonal grid mesh using the d3.hexbin library, with circular markers highlighting the start and end points. The animation loops indefinitely, alternating direction between the two views, and uses the `transform` function to calculate the appropriate translation and scaling for each frame.

AI-generated description

A demo of d3.interpolateZoom. Added in release 3.3, zoom interpolation is now supported automatically for the zoom behavior. See also the zoom transitions and map zooming examples.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3828981'>van Wijk Smooth Zooming</a>

gpl-3.0 Licensed

Similar vizzes