🌍 Public
Viewing a saved revision (read-only)
2a4ed929e38b4b518616a2006bfe2d6a
Fork of Pie Chart
This example shows 2022 US auto sales by brand as a pie chart, with a color-coded legend listing each brand and its total sales in thousands. The code loads CSV data from a GitHub gist using `d3.csv`, then computes the pie layout with `d3.pie` and draws the segments with `d3.arc`. Colors are assigned via `d3.scaleOrdinal`, and the chart is rendered as SVG in a 960×500 viewport, with a separate legend group built from the same data.
AI-generated description