Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cheap Tricks for Interaction

Public visualization

Viewing a saved revision (read-only)

56f4529135114fe39428e7439c46a9f0

Cheap Tricks for Interaction

0 stars0🌍 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