Skip to main content
100%

Fork of Pie chart RDW

✓ Published0🌍 Public
SSonuSriN
Last edited Mar 23, 2022
Created on Mar 23, 2022
Forked from Pie chart RDW

This example shows a simple pie chart of four data points representing yearly values from 2013 to 2019. Each slice is labeled with its corresponding year, and the chart uses a categorical color scheme to differentiate the segments. The visualization is built using D3 v6, with `d3.pie()` computing the arc angles, `d3.arc()` generating the SVG path shapes, and the `centroid` method positioning the year labels at the center of each slice. The data is hardcoded in the script, and the SVG is centered on the page via CSS.

AI-generated description
MIT Licensed

Similar vizzes