Cheap tricks with interaction
✓ Published2🌍 Public
This example displays a world map rendered in SVG using D3 v5 and a Mercator projection, with country boundaries drawn from TopoJSON data. It demonstrates simple interactive techniques: users can pan and zoom the map via d3.zoom, while hovering over individual countries triggers a CSS-based color change and a native tooltip showing the country name, sourced from a TSV file. The code uses d3.geoPath, d3.geoMercator, and topojson.feature.
AI-generated descriptionMIT Licensed