Skip to main content
100%

click-to-zoom via transform

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Mar 26, 2012

Clicking a US state zooms to that state via a SVG transform transition, while clicking the background resets the view. The map renders TopoJSON data through `d3.geo.albersUsa` projection and `d3.geo.path`, with state borders drawn from a topology mesh. An orange highlight marks the active state, and stroke width inversely scales with zoom. The interaction uses a `g.transition()` to animate `translate` and `scale` attributes over 750 milliseconds.

AI-generated description
gpl-3.0 Licensed

Similar vizzes