Question 1 of Activity 7.1
✓ Published0🌍 Public
This pie chart visualizes household expenditures by product category, with each slice labeled and connected to its corresponding value via an arrow line. The chart uses D3.js v7’s `d3.pie` and `d3.arc` generators to compute slice angles and paths, while `outerArc` and polylines position labels outside the circle. Data is loaded from a CSV file hosted on GitHub Gist. A legend, built with appended SVG rects and text, maps colors to categories, and `d3.scaleOrdinal` with `schemeCategory10` assigns categorical colors.
AI-generated descriptionMIT Licensed