🌍 Public
Viewing a saved revision (read-only)
5eb67e3a3c0641448ceab26995fbd456
Piechart
A pie chart displays chocolate sales proportions by product category. The visualization uses D3.js version 7, loading data from a CSV file and mapping category values to colors with `d3.scaleOrdinal` and `d3.schemeSet2`. The `d3.pie()` and `d3.arc()` functions generate the chart geometry, rendering each segment as a filled SVG path with white strokes. A custom HTML legend, built with D3 selections, labels each category using the same color scale, while the page layout is styled through external CSS.
AI-generated description