Skip to main content
100%

Cheap Tricks for Interaction

✓ Published1🌍 Public
Jjons288
Last edited Sep 26, 2018
Created on Sep 26, 2018

This example shows a world map rendered with a natural Earth projection, where clicking a country fills it red using d3.geoPath and d3.geoNaturalEarth1. It loads country boundaries from TopoJSON and country names from TSV data via d3.json and d3.tsv, then binds click events to SVG paths. The fill color updates based on a selected country ID, using a simple render function with selection.merge to handle updates.

AI-generated description
MIT Licensed

Similar vizzes