Skip to main content
100%

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

✓ Published2🌍 Public
HHwl98
Last edited Apr 21, 2020
Created on Apr 21, 2020

This example shows a world map rendered with SVG paths from TopoJSON data, where hovering over a country highlights it in red and a built-in zoom interaction transforms the entire map group. The visualization loads country boundaries from the world-atlas package, joins them with names from a TSV file, and uses d3.geoMercator with d3.geoPath for projection and rendering. It implements zoom via d3.zoom, applies tooltips through SVG title elements, and uses CSS :hover rules to change fill colors on mouseover.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes