Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of ICE - 7 Pie Chart Maanas Katta

Public visualization

Fork of ICE - 7 Pie Chart Maanas Katta

0 stars0๐ŸŒ Public
RRockkmr
Last edited Apr 2, 2022
Created on Apr 2, 2022

A pie chart visualizes the top 10 countries by estimated deaths from air pollution in 2020, with each slice labeled in thousands and accompanied by an interactive legend with colored squares and values. The chart is rendered as an SVG using D3 v5, fetching CSV data from a GitHub gist via `d3.csv`. It builds arcs with `d3.pie` and `d3.arc`, maps slice colors through `d3.scaleOrdinal`, and formats numbers with `d3.format`. Text labels are centered using arc centroids, while the legend is manually positioned with SVG groups and rectangles.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed