Skip to main content
100%

Visualisng Data with React and D3 - Pie

✓ Published1🌍 Public
SShane Carey
Last edited Jan 22, 2021
Created on Jan 22, 2021

A pie chart displays categorical data as colored wedges, with each slice representing a row from a CSS named colors dataset loaded via `d3.csv`. The React component uses the `useState` and `useEffect` hooks to fetch the data, then renders an SVG with `d3.pie()` to compute angles and `d3.arc()` to generate each path’s geometry. All slices have equal weight, and the fill color comes directly from the dataset’s `RGB hex value` field.

AI-generated description

loads data with d3 and react

MIT Licensed

Similar vizzes