Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE - 7-2 Pie Chart

Public visualization

ICE - 7-2 Pie Chart

0 stars0🌍 Public
EEshwarreddyt
Last edited Mar 12, 2023
Created on Mar 12, 2023
Forked from Fork of ICE - 7

This example visualizes the top 10 most populated states in India as a pie chart, labeling each slice with its population in millions and pairing it with a color-coded legend. The chart’s slices use a d3.pie layout, with d3.arc generating the segment paths and d3.scaleOrdinal assigning categorical colors. Data is loaded asynchronously from a CSV via d3.csv, then rendered to SVG, with text labels positioned using the arc generator’s centroid method and a custom legend built from grouped SVG elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed