Skip to main content
100%

Cheap Tricks for Interaction On a D3.js World Map!

✓ Published1🌍 Public
Aabhijit01
Last edited Apr 28, 2020
Created on Apr 28, 2020

This example shows a world map rendered as SVG paths, with hover highlighting on individual countries and zoom and pan interaction. It uses d3.geoMercator, d3.geoPath, and topojson.feature to project and draw the map from world-atlas TopoJSON and TSV data. d3.zoom and d3.event handle the zoom transform. A CSS :hover rule changes country fill to red, and SVG <title> elements display country names from the TSV mapping.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes