Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

Viewing a saved revision (read-only)

4f9085b8f9a84ba78a8fea2906c71288

Pie Chart

0 stars0🌍 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