Skip to main content
100%

Pie Chart

✓ Published1🌍 Public
Eeravellisaimeghana
Last edited Mar 29, 2022
Created on Mar 29, 2022
Forked from Pie Chart

This pie chart visualizes February car prices from a 2021 dataset, with each slice-sized proportionally to a car’s February price and paired with a legend showing car names, percentage shares, and dollar amounts. The chart uses `d3.pie` to compute segment angles and `d3.arc` for SVG path generation, with `d3.scaleOrdinal` assigning colors to slices. Legends are manually appended as rectangles and text elements, while values are formatted using `d3.format`. Data is loaded asynchronously via `d3.csv` from a GitHub Gist, and the SVG rendering is handled directly in the browser.

AI-generated description
MIT Licensed

Similar vizzes