Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Making an Interactive Pie Chart

Public visualization

Viewing a saved revision (read-only)

1fb4b90951294fb4ad5599c834611b91

Fork of Fork of Making an Interactive Pie Chart

0 stars0🌍 Public
RRochelle
Last edited Nov 5, 2021
Created on Nov 5, 2021

This interactive donut chart visualizes income breakdown across three categories—Sales, Dividends, and Interest—using repeated rows from a CSV file. Built with D3 v5, it renders an SVG donut with labeled slices and a hover tooltip displaying each category’s percentage. The code leverages `d3.pie` for arc calculation, `d3.arc` for path geometry, and `d3.scaleOrdinal` for color mapping. Hovering highlights a slice and dynamically positions a tooltip using mouse coordinates.

AI-generated description