🌍 Public
Viewing a saved revision (read-only)
c13c8b76dcd6417abdd4ec74d35a64a8
Japan Map
This example displays a map of Japan using a Mercator projection, rendered as an SVG path with a violet fill that transitions to light blue on hover. It loads geographic data from the world-atlas TopoJSON dataset, extracts Japan’s geometry via `topojson.feature`, and fits the projection to the country’s bounds using `d3.geoMercator().fitSize`. The visualization applies `d3.zoom` for interactive pan and zoom, and uses `d3.json` to fetch the data asynchronously.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.