🌍 Public
Viewing a saved revision (read-only)
b99612358992441b8ec32836a5980ecb
Question 1
This visualization displays the distribution of chocolate sales by product as a donut-style pie chart rendered with SVG via D3.js v7. The chart shows sales percentages as labels on each slice, with a legend on the right indicating each product’s share. The code loads a CSV dataset from a GitHub gist, parses the monetary amounts, and groups the data by product using `d3.rollups` and `d3.sum`. It uses `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` with the `d3.schemeCategory10` color palette.
AI-generated description