Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cheap Tricks for Interaction

Public visualization

Viewing a saved revision (read-only)

1e0f75e175194cac92f8811e7bca46ed

Cheap Tricks for Interaction

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