Skip to main content
100%

Fork of Pie chart RDW

✓ Published0🌍 Public
Yyingzhe-z
Last edited Apr 2, 2021
Created on Apr 2, 2021
Forked from Pie chart RDW

This pie chart displays the distribution of four age groups—0-20, 20-40, 40-60, and 60+—with equal counts of 6, 6, 9, and 9 respectively. Using D3.js v6, the visualization builds an SVG with `d3.pie()` to compute arc angles and `d3.arc()` to generate the path shapes and label positions. A categorical color scale (`d3.scaleOrdinal` with `d3.schemeCategory10`) fills each slice, and text labels are placed via `label.centroid()`. The chart is centered through an SVG transform and styled with CSS.

AI-generated description
MIT Licensed

Similar vizzes