Skip to main content
100%

Pie chart-ice-7

✓ Published1🌍 Public
SSaiipriiya
Last edited Mar 12, 2023
Created on Mar 10, 2023
Forked from HTML Starter

This example uses a D3 pie chart to show the top 10 countries by prisoner count, with each slice labeled in thousands and a legend listing country names beside their values. The chart is rendered as SVG using the `d3.pie()` and `d3.arc()` functions, with colors assigned via `d3.scaleOrdinal()`. Data is loaded asynchronously from a CSV file using `d3.csv`, and text labels are positioned with `arc.centroid()`. The visualization highlights the relative share of prisoners per country using a simple categorical color scheme.

AI-generated description
MIT Licensed

Similar vizzes