Skip to main content
100%

Pie Chart with Labels and Legend ice-7

✓ Published3🌍 Public
Bbadrinath888@gmail.com
Last edited Oct 23, 2025
Created on Oct 23, 2025

This pie chart displays CO₂ emissions by continent, with each slice labeled directly on the chart and accompanied by a color-coded legend. The chart uses D3.js v7 with an SVG rendering approach, loading data from a CSV file via `d3.csv()`. Slice geometry is generated using `d3.pie()` and `d3.arc()`, with labels positioned at slice centroids and a legend built using SVG `rect` and `text` elements. Colors are mapped through a `d3.scaleOrdinal` with the `schemeCategory10` palette.

AI-generated description
MIT Licensed

Similar vizzes