🌍 Public
Viewing a saved revision (read-only)
98acdf68407b4ea0bbd4fe72ea14a37e
Fork of Making an Interactive Pie Chart
This interactive donut chart displays the distribution of income across three categories—Sales, Dividends, and Interest—from a CSV file. The visualization uses D3 v5’s `pie` and `arc` APIs to generate the donut segments, with a `scaleOrdinal` color scale for category distinction. Hovering over a slice triggers a tooltip, implemented via D3’s `select`, showing the percentage contribution of that category, calculated with `sum` from the data’s amount field. The SVG rendering includes labeled text for each slice, and slices are interactive with `mouseover` and `mouseout` events.
AI-generated description