🌍 Public
Viewing a saved revision (read-only)
645476a9cfe54d21aaf6b64c2e7dc7a4
Making an Interactive Pie Chart
This interactive donut chart displays income sources—Sales, Dividends, and Interest—with each slice labeled and colored via a d3.scaleOrdinal. It uses d3.pie and d3.arc to generate the SVG paths, while mouseover events calculate percentages from the CSV data and reposition a tooltip with d3.select. The chart responds to hovers by increasing slice opacity and shows precise share values, with styling in CSS.
AI-generated description