Skip to main content
Public

Share visualization

Loading preview…

Activity 7_Question 1

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

Activity 7_Question 1

0
Hharinihari6791@gmail.com
Last edited Apr 10, 2025
Created on Apr 10, 2025
Forked from Hello VizHub

This pie chart displays the distribution of causes of death in the United States for 2023, with each slice labeled by its percentage of total deaths. The code uses D3 v7 with the `d3.pie` and `d3.arc` generators to compute and draw the arcs, while `d3.scaleOrdinal` with `d3.schemeSet2` assigns categorical colors. Data is loaded remotely from a CSV file via `d3.csv`, and a custom legend on the right pairs each cause with its corresponding percentage. The SVG rendering includes axis labels and bold percentage text positioned using `labelArc.centroid`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed