🌍 Public
Viewing a saved revision (read-only)
8dacdd5e7f2d49fb8f1f19f751d1b3bc
Q1. A1.
This example shows the top five countries by population in 2020 as a pie chart with a color-coded legend, using data from a CSV file loaded via `d3.csv`. The pie slices are generated with `d3.pie` and `d3.arc`, colored by `d3.schemeCategory10`, and rendered as SVG paths. A legend, built with appended `rect` and `text` elements, maps each country to its slice color.
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.