Skip to main content
100%

Activity 7 Question 1

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

This visualization shows the sales distribution by product as a pie chart, with each slice sized proportionally to the total sales for that product. The code loads a CSV file from a GitHub repository using `d3.csv`, then groups and aggregates the data with `d3.rollup` and `d3.sum`. It renders the pie chart using `d3.pie` and `d3.arc` paths, colors slices with `d3.scaleOrdinal` and the Tableau 10 color scheme, and adds a legend with product names and colored swatches. The chart is drawn as an SVG with white slice strokes and labels positioned at slice centroids.

AI-generated description
MIT Licensed

Similar vizzes