Fork of Fork of Fork of Pie Chart
✓ Published1🌍 Public
This example shows 2022 US auto sales by brand as a pie chart with a legend listing each brand, its percentage of total sales, and its sales volume in thousands. The chart renders as an SVG using D3 v5, with sales data loaded from a CSV file via a helper function that uses `d3.csv`. Slices are generated with `d3.pie` and `d3.arc`, while `d3.scaleOrdinal` assigns colors to each brand. The legend displays brand names and computed percentages and volumes, with values formatted using `d3.format`.
AI-generated descriptionMIT Licensed