🌍 Public
Viewing a saved revision (read-only)
0e6e0e43324c4a708784bd96a86c9fb4
Fork of Pie Chart
This example visualizes 2022 US auto sales by brand as a pie chart, showing each brand’s year-to-date sales as a slice of a donut. The chart uses a categorical color scale to distinguish brands and includes a legend with each brand’s name and sales value in thousands. Built with D3 v5, the code loads CSV data from a GitHub gist using `d3.csv`, then constructs the pie with `d3.pie` and `d3.arc`, and renders the SVG paths and legend using `d3.select` and `d3.scaleOrdinal`.
AI-generated description