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
SSonuSriN
Last edited Mar 23, 2022
Created on Mar 23, 2022
Forked from Pie chart RDW

This example shows a simple pie chart of four data points representing yearly values from 2013 to 2019. Each slice is labeled with its corresponding year, and the chart uses a categorical color scheme to differentiate the segments. The visualization is built using D3 v6, with `d3.pie()` computing the arc angles, `d3.arc()` generating the SVG path shapes, and the `centroid` method positioning the year labels at the center of each slice. The data is hardcoded in the script, and the SVG is centered on the page via CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed