Skip to main content
100%

Fork of Pie chart RDW

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

This D3.js (v6) example renders a simple pie chart using SVG, displaying four data points that map years (2013, 2014, 2015, 2019) to numeric values. The chart uses `d3.pie()` to compute arc segments and `d3.arc().outerRadius(200)` to define the pie geometry, with each slice filled by a category-10 color based on its value. Year labels are placed using the `centroid()` method of an inner arc, offset from the center. The data is hardcoded in the script, and the visualization is centered on a 400×400 SVG canvas using CSS transforms.

AI-generated description
MIT Licensed

Similar vizzes