Skip to main content
Public

Share visualization

Loading preview…

Fork of ice7

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 ice7

0
TTekmal-Bhavana
Last edited Mar 30, 2023
Created on Mar 30, 2023

This example shows the top 10 countries by COVID-19 deaths using a static pie chart rendered as SVG. The code loads CSV data from a GitHub gist via `d3.csv`, computes each country’s death count as a percentage, and maps those values to pie segments using `d3.pie` and `d3.arc`. Color encoding is handled with `d3.scaleOrdinal`, while a legend with rectangles and text labels is built manually using D3’s selection and append methods. The chart includes a heading and numeric percentage labels formatted with `d3.format`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed