Skip to main content
Public

Share visualization

Loading preview…

Vizhub for pie chart

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

Vizhub for pie chart

0
NNHRK555
Last edited Jul 2, 2022
Created on Jul 2, 2022

This pie chart visualizes the top five U.S. states by fuel consumption percentage, with each slice labeled and color-coded, alongside a legend listing state names and values. The data is loaded from a CSV file via `d3.csv`, and the chart is rendered as SVG using `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` for colors. Text labels are positioned on slice centroids with `arcGenerator.centroid`, while the legend is built manually with SVG rectangles and text elements. The visualization updates dynamically as the CSV is fetched asynchronously.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed