Skip to main content
100%

Cheap Tricks for Interaction

✓ Published1🌍 Public
YYIN Wanxuan
Last edited May 6, 2020
Created on May 6, 2020

This example demonstrates interactive pan and zoom on a natural Earth projection map. The visualization renders country boundaries from TopoJSON world-atlas data using `d3.geoNaturalEarth1` and `d3.geoPath`, with hover highlighting via CSS. The code applies `d3.zoom` to the SVG container, updating a transform attribute on a group element during zoom events. Country names from the `world/50m.tsv` file appear as tooltips using SVG `<title>` elements, while the sphere background and country fills come from external styles.

AI-generated description
MIT Licensed

Similar vizzes