🌍 Public
Viewing a saved revision (read-only)
997f67f0150e4a1a903f4c000a0bccc0
Activity7_Question1_PieChart
This pie chart visualizes chocolate sales by product for March, sourced from a CSV file hosted on GitHub. It uses D3.js to load and filter the data, calculating total sales per product with `d3.rollup` and `d3.sum`. The chart is drawn with `d3.pie()` and `d3.arc()`, while an ordinal color scale maps product names to a blue interpolated palette. A custom legend displays each product alongside its percentage of total sales, rendered as an SVG with a flexible HTML layout.
AI-generated description