Skip to main content
100%

Pie Chart

✓ Published0🌍 Public
Hharika-1929
Last edited Jul 3, 2022
Created on Jun 30, 2022
Forked from ICE7-Pie Chart

This pie chart visualizes population figures for US states, displaying each state as a colored slice with its population value labeled in millions. The chart uses d3.pie() to compute angular segments and d3.arc() with an inner radius of zero to generate the SVG paths. A legend is rendered to the right, mapping each state name to its corresponding color and population value. The data is loaded as CSV from a GitHub gist, and colors are assigned using d3.scaleOrdinal() with a predefined array of ten distinct colors.

AI-generated description
MIT Licensed

Similar vizzes