Skip to main content
100%

Question 1 of Activity 7.1

✓ Published0🌍 Public
Kkrishi7079@gmail.com
Last edited Apr 6, 2025
Created on Apr 6, 2025
Forked from Hello VizHub

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
MIT Licensed

Similar vizzes