🌍 Public
Viewing a saved revision (read-only)
5d3df8faa6874a4dbe7636b795b341e9
Question 1 of Activity 7.1
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 description