Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task9-Pie Chart

Public visualization

Task9-Pie Chart

0 stars0🌍 Public
VVijay Sheru
Last edited Apr 20, 2024
Created on Apr 20, 2024

This pie chart visualizes grocery item expenditures by category, with each slice colored and labeled by dollar value. The chart is rendered in SVG using D3 v5, with pie segments generated via `d3.pie` and `d3.arc`. Data is fetched from a remote CSV using `d3.csv`, and ordinal color scaling (`d3.scaleOrdinal`) maps categories to a four-color palette. Labels and a legend are positioned manually, with tick text formatted using `d3.format`. The visualization directly conveys relative spending across grocery item types.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed