Skip to main content
100%

Cheap Tricks for Interaction

✓ Published3🌍 Public
CChooo4u
Last edited Sep 26, 2018
Created on Sep 22, 2018

This example shows an interactive world map where clicking anywhere on the SVG injects randomly sized circles onto the canvas, while hovering over individual countries highlights them by changing fill color using CSS. The visualization renders country boundaries from TopoJSON world-atlas data via a natural Earth projection in d3.geoPath, and implements pan-and-zoom controls through d3.zoom. The map itself uses svg elements, with mouse interaction handled through d3.mouse to capture click coordinates, and the underlying country names are loaded from a TSV file.

AI-generated description
MIT Licensed

Similar vizzes