🌍 Public
Viewing a saved revision (read-only)
355644c7c33f4e3a81e6c1d663df0161
Cheap Tricks for Interaction(Even cheaper with CSS)
This example demonstrates a zoomable world map with interactive country selection, where clicking toggles a filled highlight state. It uses d3.geoNaturalEarth1 and d3.geoPath to render TopoJSON country boundaries from the world-atlas dataset, combined with d3.zoom for panning and scaling. The effect relies on CSS :hover and a .selected class triggered via d3’s event handler, supplemented by SVG <title> elements for tooltips. The render loop binds the country features and appends path elements to the SVG canvas.
AI-generated description