Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Interactive Pie Chart for Violence Data

Public visualization

Interactive Pie Chart for Violence Data

0 stars0🌍 Public
DDibya Prokash Sarkar
Last edited Feb 28, 2021
Created on Feb 28, 2021

This interactive pie chart visualizes the distribution of income categories—Sales, Dividends, and Interest—using data from a local CSV file. Rendered as a donut chart with SVG, it employs D3 v5’s `pie` and `arc` functions to compute slice geometries and a `scaleOrdinal` for color encoding. Hovering over a slice triggers a tooltip that calculates and displays the percentage share of the total, using D3’s `sum` and event handling. The visualization uses a custom style sheet for hover effects and tooltip styling.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed