🌍 Public
Viewing a saved revision (read-only)
e2816483b04b4872b8a4a8b61d3e5ed2
Fork of Pie Chart
This example shows 2022 US auto sales by brand as a pie chart, with a legend listing each brand and its sales value in thousands. The code loads CSV data from a GitHub gist using `d3.csv`, then builds the chart with `d3.pie` and `d3.arc` for segment geometry. A `d3.scaleOrdinal` maps sales values to a custom color palette, and SVG paths and text elements render the chart and legend. The visualization uses D3 v5 and is drawn entirely in SVG.
AI-generated description