Activity_7.1.1
✓ Published0🌍 Public
This example visualizes 2022 US auto sales by brand as a pie chart, with each slice colored and accompanied by a legend showing brand names, their percentage of total sales, and sales figures in thousands. The code loads CSV data via `d3.csv`, computes pie layout using `d3.pie`, and renders SVG paths with `d3.arc`. Legends are built manually with appended rectangles and text, using `d3.scaleOrdinal` for categorical colors and `d3.format` for tick labels.
AI-generated descriptionMIT Licensed