Skip to main content
Public

Share visualization

Loading preview…

Fork of Pie chart RDW

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Pie chart RDW

0
Yyingzhe-z
Last edited Apr 2, 2021
Created on Apr 2, 2021
Forked from Pie chart RDW

This pie chart displays the distribution of four age groups—0-20, 20-40, 40-60, and 60+—with equal counts of 6, 6, 9, and 9 respectively. Using D3.js v6, the visualization builds an SVG with `d3.pie()` to compute arc angles and `d3.arc()` to generate the path shapes and label positions. A categorical color scale (`d3.scaleOrdinal` with `d3.schemeCategory10`) fills each slice, and text labels are placed via `label.centroid()`. The chart is centered through an SVG transform and styled with CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed