Fork of Pie Chart
✓ Published0🌍 Public
A pie chart visualizes 2022 US auto sales by brand, colored by country of origin. The D3.js v5 code loads comma-separated data from a GitHub gist, converts the basic cost values to numbers, and uses `d3.pie` and `d3.arc` to generate SVG path segments. A categorical color scale (`d3.scaleOrdinal` with `schemeCategory10`) fills each slice. The chart includes an interactive legend on the right, where hovering over a slice logs the country and cost to the console, and legend entries display brand names with formatted dollar amounts.
AI-generated descriptionMIT Licensed