🌍 Public
Viewing a saved revision (read-only)
9922b25b1c094301b890cbfe5f1e7438
ICE7-q2
This example shows the distribution of cosmetics brand stock as a pie chart, with each slice labeled directly on the chart and an interactive legend to the side displaying brand names and total values. It uses D3.js v7 with SVG rendering, loading CSV data from a GitHub Gist via `d3.csv`. The chart employs `d3.pie` and `d3.arc` to generate slices, `d3.scaleOrdinal` with `d3.schemeTableau10` for color encoding, and `d3.group` with `d3.sum` to aggregate stock values by brand.
AI-generated description