Skip to main content
100%

Tricks for interaction

✓ Published0🌍 Public
DDi Zhen
Last edited Jun 23, 2019
Created on Jun 23, 2019

This example demonstrates a world map with interactive hover effects, where each country changes color to red and displays its properties in the console. The visualization uses a Natural Earth projection via `d3.geoNaturalEarth1` and renders countries as SVG paths using `d3.geoPath`. Geographic data comes from the world-atlas TopoJSON file, processed with `topojson.feature`. The CSS `:hover` pseudo-class triggers the color change, while D3's `append('title')` logs country data to the console. The map includes a styled sphere background with a blue fill.

AI-generated description
MIT Licensed

Similar vizzes