Skip to main content
100%

ICE - 7-2 Pie Chart

✓ Published0🌍 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
MIT Licensed

Similar vizzes