Skip to main content
100%

Fork of Pie Chart

✓ Published0🌍 Public
Jjampani921@gmail.com
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Pie Chart

This example displays mortality rates across US states using a pie chart, with each slice representing a state’s death count and a legend listing state names alongside their numeric values. It loads CSV data from a GitHub gist, parses it with the `csv` function from D3 v5, and renders the chart as SVG. The visualization uses `pie` to compute slice angles, `arc` to generate path geometry, and `scaleOrdinal` to map states to a fixed color palette. Slice labels are positioned using `arc.centroid`, and the legend is built manually with appended `rect` and `text` elements.

AI-generated description
MIT Licensed

Similar vizzes