Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Visualisng Data with React and D3 - Pie

Public visualization

Visualisng Data with React and D3 - Pie

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed