Skip to main content
100%

Cheap Tricks 4 Interaction

✓ Published0🌍 Public
JJames Barbour, Jr.
Last edited May 4, 2020
Created on Apr 24, 2020

This example shows a world map with countries rendered as light green SVG paths that turn red on hover, with a blue sphere backdrop. The map uses a natural Earth projection via `d3.geoNaturalEarth1` and `d3.geoPath`, pulling country boundaries from TopoJSON and names from TSV data in the world-atlas package. Pan and zoom interactions are implemented with `d3.zoom`, applying transform events to a grouped `g` element containing all country paths, while country names appear as tooltips through SVG `title` elements.

AI-generated description
MIT Licensed

Similar vizzes