Skip to main content
100%

Donnors Pie Chart - React & D3.js

✓ Published0🌍 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
MIT Licensed

Similar vizzes