🌍 Public
Viewing a saved revision (read-only)
a9ee034d65ea49078dc9dedf184d2337
World Map with D3.js
This example displays a world map using D3.js, rendering country boundaries as SVG paths on a light gray background. It loads GeoJSON data from a remote GitHub repository and projects it usingd3.geoMercator with fitSize to match the 800x600 viewport. The code demonstrates thed3.json method for asynchronously fetching data andd3.geoPath to generate the path strings, styling each country with a default gray fill and white stroke.
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.