Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Activity 7 Question 1

Public visualization

Viewing a saved revision (read-only)

1a4f96bd7d05481a98390c620271e418

Fork of Activity 7 Question 1

0 stars1🌍 Public
Ddivya.matavalam828@gmail.com
Last edited Apr 6, 2025
Created on Apr 6, 2025

This pie chart visualizes total sales by product category using a donut layout. It loads sales data from a remote CSV file via `d3.csv`, aggregates values with `d3.rollup`, and computes arc angles using `d3.pie`. Each slice is rendered as an SVG `path` with `d3.arc`, colored by `d3.scaleOrdinal` with `d3.schemeSet2`, and labeled at the arc centroid. A manual legend maps product names to their corresponding colors. The visualization demonstrates a standard D3 v5 pie chart workflow with external data loading and SVG rendering.

AI-generated description