Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making an Interactive Pie Chart

Public visualization

Making an Interactive Pie Chart

0 stars1🌍 Public
BbeauMarko
Last edited Oct 9, 2020
Created on Sep 2, 2020

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

Comments

Sign in to join the discussion.

MIT Licensed