Cheap Tricks 4 Interaction
✓ Published0🌍 Public
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 descriptionMIT Licensed