Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Fork of Fork of ICE 7 Pie Chart

Public visualization

Viewing a saved revision (read-only)

e4fc2c0fae484e0683e2992a9e174ed6

Fork of Fork of Fork of Fork of ICE 7 Pie Chart

0 stars0🌍 Public
PPrathyusha0304
Last edited Mar 27, 2022
Created on Mar 27, 2022

This example visualizes the top 5 countries by reported deaths in 2020 as a pie chart rendered in SVG. Each slice is colored and labeled with the number of deaths, while a legend to the right lists country names and their corresponding totals. The code fetches CSV data from a GitHub gist, parses it with d3.csv, and uses d3.pie and d3.arc to generate the chart. Colors are assigned via d3.scaleOrdinal, and labels are positioned using arc.centroid. The page loads d3 v5 from unpkg and embeds the logic in a bundle.js file.

AI-generated description