Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Making an Interactive Pie Chart

Public visualization

Viewing a saved revision (read-only)

28ecb5e198b74b18bcf01ce1f5ee30ba

Fork of Making an Interactive Pie Chart

0 stars1🌍 Public
66mandati6
Last edited Mar 25, 2021
Created on Mar 24, 2021

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