🌍 Public
Viewing a saved revision (read-only)
e2c8cbad58ce4170b85f686e6a9b5129
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