Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Assignment_7_Q2

Public visualization

Viewing a saved revision (read-only)

b490c276536e4966bb556b1bf0b32a32

Assignment_7_Q2

0 stars0🌍 Public
SSai Charan
Last edited Oct 27, 2025
Created on Oct 27, 2025
Forked from HTML Starter

This pie chart visualizes total expenses aggregated by region from an inline CSV dataset containing monthly sales, profit, expenses, and region fields. The D3.js (v7) code uses `d3.rollup` and `d3.sum` to aggregate expenses per region, then renders SVG slices with `d3.pie` and `d3.arc`. Interactive tooltips appear on mouseover showing the exact expense value, while slice labels display percentage shares (hidden below 5%). A legend with color-coded rectangles identifies each region and its total expenses, using `d3.scaleOrdinal` with the `schemeTableau10` color scheme.

AI-generated description