Skip to main content
Public

Share visualization

Loading preview…

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

pie chart

0
Ssrinathkarumuru@my.unt.edu
Last edited Oct 27, 2025
Created on Oct 27, 2025

A pie chart visualizes customer spending across four categories—Food, Clothing, Electronics, and Entertainment—using quantitative values. Built with D3.js v7, it renders an SVG slice for each category, sized by its value, with labels positioned at each slice’s centroid. A color scale from `d3.schemeCategory10` and `d3.scaleOrdinal` map categories to fills, while `d3.arc` and `d3.pie` compute the geometry. A separate HTML legend lists each category with its corresponding color and value. The chart uses a fixed 500×500 pixel canvas and is re-rendered by clearing and redrawing the SVG elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed