Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7.1 Question 1

Public visualization

Viewing a saved revision (read-only)

2f21ca80739f4f3e8597b184b83c2d93

Activity 7.1 Question 1

0 stars0🌍 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

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.