🌍 Public
Viewing a saved revision (read-only)
503e95d6f19f4382bf07ea665abe58d8
Activity7_Question1
This example visualizes monthly spending across six selected expense categories—Electronics, Groceries, Travel, Dining Out, Healthcare, and Utilities—as a pie chart. The code loads CSV data via d3.csv, filters the records, and renders SVG slices using d3.arc and d3.pie. A d3.scaleOrdinal with schemeCategory10 assigns colors, while each slice includes a white label and a legend is drawn alongside. The chart is built as a reusable function pieChart, with axis-style labels added for context.
AI-generated description