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

2
Ppvvaishnavi93@gmail.com
Last edited Mar 27, 2026
Created on Mar 27, 2026

This pie chart displays monthly expense categories—Rent, Food, Travel, Shopping, and Bills—with proportional slices and a labeled legend. Built with D3 v7, it loads data from a CSV file, computes arc paths using `d3.pie()` and `d3.arc()`, and positions category labels via `labelArc.centroid(d)`. A categorical color scale (`d3.scaleOrdinal`) assigns colors, while the SVG rendering includes a title and a legend showing each category’s value. The chart is generated entirely with SVG elements and a custom legend.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed