Cheap Tricks for Interaction
✓ Published1🌍 Public
This example demonstrates an interactive world map rendered with SVG using D3.ts topojson for geographic data and a world-atlas dataset. The map shows countries as light green paths with black borders, which turn red on hover via CSS. Users can pan and zoom the map through D3's zoom module, which applies a transform to the group containing all country paths. The code also generates a sphere background and adds country name tooltips from TSV data.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed