Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question 1

Public visualization

Viewing a saved revision (read-only)

0fcf734b7fa141468e80ef6c930f38ef

Question 1

0 stars1🌍 Public
Bbhavanasruthikakarlapudi@gmail.com
Last edited Apr 6, 2025
Created on Apr 6, 2025
Forked from Hello HTML

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