Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Donnors Pie Chart - React & D3.js

Public visualization

Donnors Pie Chart - React & D3.js

0 stars0🌍 Public
BbeauMarko
Last edited Mar 3, 2021
Created on Mar 3, 2021

This example shows an interactive pie chart for donor contributions, with a table below that lets users choose which data attribute to visualize—overall proportions, COVID-19–related funding, or other purposes—by hovering over column headers. The chart recomputes the pie slices based on the selected attribute, which is passed up from the table via a state setter in React. The visualization uses D3’s `pie` and `arc` generators to compute the slice geometry and `interpolateRgb` to assign a color scale, while React renders the SVG elements and manages the dynamic state.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed