🌍 Public
Viewing a saved revision (read-only)
c89cb552763f4247b935be8b15c20998
Fork of 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