Skip to main content
100%

Cheap Tricks for interaction!

✓ Published0🌍 Public
Mmeihaoming
Last edited Nov 24, 2019
Created on Nov 24, 2019

This example shows an interactive world map where hovering over a country turns it red and zooming with the mouse repositions the map. It uses D3.js v5 with `d3.geoNaturalEarth1` for the projection, `d3.geoPath` for rendering, and `d3.zoom` to handle pan and zoom transforms on the SVG group. Country boundaries come from the `world-atlas` TopoJSON file, with names joined from a TSV file. The visualization demonstrates fundamental DOM selection and data binding, alongside simple CSS hover styling.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes