🌍 Public
Viewing a saved revision (read-only)
de5c07251a31440dafda4a87bbb2ee2e
1
This example shows a pie chart of country populations, with each slice labeled by country name and a legend mapping colors to countries. Hovering over a slice’s label displays a tooltip with the population (formatted with commas) and literacy rate. Built with D3 v7, the visualization uses `d3.pie()` and `d3.arc()` to generate SVG paths, while data is loaded via `d3.csv()` from a GitHub gist. The tooltip is manually shown and hidden through D3 selection and style updates, and colors come from `d3.schemeSet3`.
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.