Skip to main content
100%

Cheap Tricks for Interaction

✓ Published0🌍 Public
YYF
Last edited Sep 22, 2018
Created on Sep 22, 2018

This example shows a zoomable world map rendered with D3 v5 and TopoJSON, where hovering over any country highlights it in red. The map uses a natural Earth projection via `d3.geoNaturalEarth1` and `d3.geoPath` to draw country boundaries from the world-atlas 50m dataset, with country names added as tooltips using `<title>` elements. Interaction combines `d3.zoom` on the SVG for pan and zoom transformations, plus CSS `:hover` styling for the highlight effect. The base map and sphere are drawn as SVG paths, with data joined from TSV metadata and JSON topology.

AI-generated description
MIT Licensed

Similar vizzes