Pie chart-Mahesh-ICE 7
✓ Published0🌍 Public
This pie chart visualizes Amazon’s 2022 revenue by state, showing each state’s proportional share of total revenue. The chart uses D3 v5’s `pie()` and `arc()` generators to compute and render SVG slices, with a legend on the right listing states and their revenue values. The code fetches data from a CSV file via `csv()` and colors each slice using `scaleOrdinal`. Text labels display revenue in thousands (e.g., “12.34K”), formatted with D3’s `format()`. The visualization is rendered entirely with SVG, and the legend includes both state names and corresponding revenue amounts.
AI-generated descriptionMIT Licensed