🌍 Public
Viewing a saved revision (read-only)
2ebb21ebe2fd43709c35155b3e0eb5ca
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 description