Skip to main content
100%

Activity_7.1.1

✓ Published0🌍 Public
CCodeNinja
Last edited Nov 3, 2024
Created on Nov 3, 2024
Forked from Pie Chart

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 description
MIT Licensed

Similar vizzes