Skip to main content
Public

Share visualization

Loading preview…

Cheap tricks for interaction.js

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Cheap tricks for interaction.js

1
NNeepaB
Last edited Dec 22, 2020
Created on Dec 22, 2020

This example shows an interactive world map where individual countries are highlighted in red on hover, with a zoomable natural Earth projection. The visualization loads geographic data from the world-atlas package, including both topojson geometry and a TSV file containing country names. Using D3’s geoPath and geoNaturalEarth1 projection, it renders countries as SVG paths; the zoom feature relies on D3’s zoom event handler to adjust the group’s transform. Country names are joined from the TSV data based on ISO numeric codes.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed