Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

DV ICE7- Pie Chart for Monthly spendings data

Public visualization

Viewing a saved revision (read-only)

10e3f3d3260b4c12971a2a56b3b0fe8e

DV ICE7- Pie Chart for Monthly spendings data

0 stars1🌍 Public
Ppravalika.thogaru10@gmail.com
Last edited Mar 12, 2023
Created on Mar 12, 2023
Forked from Pie Chart ICE-7

This example shows a pie chart of monthly spending across departments, with each slice labeled and a legend displaying both the department name and its expenditure amount in dollars. The chart is rendered as an SVG using D3 v5, with the pie layout and arc generator (via `d3.pie` and `d3.arc`) computing slice positions and paths. A categorical color scale (`scaleOrdinal`) assigns colors to slices, and text elements are placed at arc centroids using `arcGenerator.centroid`. Data is loaded asynchronously from a CSV file via `d3.csv`, and the legend is built manually with appended rectangles and text elements.

AI-generated description

A demonstration of how to start using D3 version 6.