Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

Viewing a saved revision (read-only)

03867a99724c4ae983bcb0d19f3c1f8e

Pie Chart

0 stars0🌍 Public
SSatish Nallamadugu
Last edited Apr 23, 2024
Created on Apr 23, 2024
Forked from Pie Chart

This pie chart shows the number of accidents in each state in 2023, with each slice labeled by its value in thousands and a legend mapping colors to states. The visualization uses D3 v5’s `pie` and `arc` generators to compute slice angles and paths, rendered as SVG elements. Data is loaded asynchronously via `d3.csv` from a GitHub gist, and `scaleOrdinal` assigns colors to states. Slice labels are positioned using `arc.centroid`, while the legend and axis titles are added as HTML divisions.

AI-generated description

A demonstration of Pie chart.