Firoze_sd_q1
✓ Published0🌍 Public
This example uses a pie chart to display the number of students graduating from different fields at IIT Mumbai. The data is fetched via the `csv` function from D3 v5 and rendered as SVG paths using the `pie` and `arc` generators, with a `scaleOrdinal` mapping categorical colors to each segment. D3’s `arc().centroid()` positions text labels showing values in thousands, and a legend built with SVG `rect` and `text` elements lists the majors alongside their totals. The chart is centered with a fixed viewport, and styling is applied through CSS classes.
AI-generated descriptionMIT Licensed