Skip to main content
100%

Activity 7.1 Question 1

✓ Published0🌍 Public
UUday Vandanapu
Last edited Nov 4, 2024
Created on Nov 4, 2024

This pie chart displays literacy rates for 10 countries, with each slice labeled by its rate divided by 1000 and suffixed with "K," alongside a legend mapping colors to country names. The visualization uses D3 v5’s `pie` and `arc` generators to compute and draw the SVG paths, with `scaleOrdinal` assigning colors from a hardcoded array. Data is loaded asynchronously via `d3.csv` from a GitHub-hosted CSV file, and slice labels are positioned using the arc generator’s `centroid` method. The chart includes both slice text and a separate legend group, with formatted numbers via `d3.format`.

AI-generated description
MIT Licensed

Similar vizzes