Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Cheap Tricks for Interaction

Public visualization

Cheap Tricks for Interaction

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed