Skip to main content
100%

Cheap Tricks for Interaction

✓ Published0🌍 Public
BBryan Ray
Last edited Nov 19, 2019
Created on Nov 8, 2019

An orthographic world map demonstrates interaction with drag and zoom. The drag handler rotates the globe by adjusting the D3 projection’s rotation, while the zoom handler scales it using `projection.scale`. Rendered with `d3.geoPath`, the land features come from TopoJSON’s `world-110m.json`. Both `d3.drag` and `d3.zoom` trigger redraws, keeping the single landmass path updated. The example uses D3 v5 with SVG output, showing a blue sphere background and green countries that turn red on hover.

AI-generated description
MIT Licensed

Similar vizzes