Skip to main content
100%

Pie Chart

✓ Published0🌍 Public
SSathviKankanala@my.unt.edu
Last edited Oct 29, 2025
Created on Oct 29, 2025
Forked from HTML Starter

A pie chart displays the average calories burned for each workout type—Cardio, HIIT, Strength, and Yoga—based on data from lifestyle.csv. The code uses D3 v7’s `d3.csv`, `d3.rollup`, and `d3.mean` to aggregate the data, then `d3.pie` and `d3.arc` to generate the SVG paths. A categorical color scale with `d3.schemeSet2` colors each segment, and labels are placed using `arc.centroid`. A legend is appended manually using D3 selections.

AI-generated description
MIT Licensed

Similar vizzes