Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published1🌍 Public
NNikhil Sharma
Last edited Mar 21, 2022
Created on Mar 21, 2022

This example renders a pie chart of CSS named colors using React and D3 v5. It loads the data asynchronously from a CSV file via `d3.csv` into React state with `useState` and `useEffect`. The visualization computes pie arc paths using `d3.pie()` and `d3.arc()`, filling each slice with its corresponding CSS color value. While loading, a message prop from `message.js` displays the dataset’s size and row count, and the final SVG output fits 960 by 500 pixels.

AI-generated description
MIT Licensed

Similar vizzes