Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Easy Pie Chart

Public visualization

Easy Pie Chart

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed