Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SDV Activity 7

Public visualization

Viewing a saved revision (read-only)

c88fe2bf6a5e47b0971bc315c9cc3535

SDV Activity 7

0 stars1🌍 Public
BBamanGayathri
Last edited Nov 5, 2024
Created on Nov 5, 2024
Forked from Hello VizHub

This example shows the top 10 countries by population in 2020 using a pie chart rendered as SVG. It loads data from a GitHub gist CSV file and calculates the total population to proportionally size each slice. The visualization uses D3 v5 APIs including `d3.pie`, `d3.arc`, `d3.scaleOrdinal`, and `d3.format` to compute arcs, assign section colors, and format labels. A legend with colored rectangles and country names accompanies the chart.

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.