Skip to main content
100%

Easy Pie Chart

✓ Published0🌍 Public
Hhanulik.ondrej@gmail.com
Last edited Aug 10, 2022
Created on Aug 9, 2022
Forked from Pie chart TT

This example displays a simple pie chart with four slices, using colors and numeric labels to represent the provided dataset. The chart is built with D3 v4 on an SVG canvas, where a group element is centered and `d3.pie()` computes the start and end angles for each arc. These angles are rendered using `d3.arc()` with a specified inner and outer radius and pad angle, while `d3.scaleOrdinal` assigns the slice colors. Each wedge is labeled with its data value using `arc.centroid` to position the text.

AI-generated description
MIT Licensed

Similar vizzes