Skip to main content
100%

Pie chart-Mahesh-ICE 7

✓ Published0🌍 Public
Ppmbhupathibalu@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024

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

Similar vizzes