Skip to main content
100%

Ic_7 pie chart

✓ Published0🌍 Public
SSaivignesh-9176
Last edited Mar 13, 2023
Created on Mar 13, 2023
Forked from Pie Chart

This pie chart shows the distribution of 2022 U.S. auto sales by brand, with each slice colored and accompanied by a legend displaying the brand name, its percentage of total sales, and the sales figure in thousands. The data is loaded from a CSV file via `d3.csv` (imported through the `getData` helper) and rendered as SVG using D3 v5. Slices are generated with `d3.pie` and `d3.arc`, while `scaleOrdinal` assigns the color palette. Legends are constructed manually with appended `rect` and `text` elements, formatting percentages and values with `d3.format`.

AI-generated description
MIT Licensed

Similar vizzes