Skip to main content
100%

Cheap tricks for interaction with D3.js!

✓ Published1🌍 Public
CCarloWK1202
Last edited Jul 14, 2022
Created on Jul 14, 2022

This example shows a zoomable world map rendered with SVG paths, using a natural Earth projection and hover highlighting to change each country’s fill color. It demonstrates simple interaction tricks in D3.js v5, combining `d3.geoNaturalEarth1`, `d3.geoPath`, and the `d3.zoom` API to apply transforms to a containing group. Country boundaries come from TopoJSON world-atlas data, merged with country names from a TSV file, and the code uses `title` elements for basic tooltips.

AI-generated description
MIT Licensed

Similar vizzes