Skip to main content
100%

Fork of Fork of Loading Data with React & D3

✓ Published1🌍 Public
JJakub
Last edited Dec 10, 2021
Created on Dec 10, 2021

This example displays the CSS named colors as a full-circle pie chart, with each color represented by a single slice. The visualization uses React hooks (`useState`, `useEffect`) to load the CSV data asynchronously via `d3.csv`, then renders SVG paths generated with `d3.pie` and `d3.arc`. The chart centers on a 960×500 SVG canvas, and each slice’s fill directly uses the RGB hex value from the data. While the code includes a loading message, the final chart demonstrates how D3’s layout functions integrate with React’s declarative rendering model.

AI-generated description
MIT Licensed

Similar vizzes