Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Redndering data with React

Public visualization

Viewing a saved revision (read-only)

121645a6cfbc4d22824397b773217fab

Fork of Redndering data with React

0 stars1🌍 Public
Ccynichole
Last edited Feb 17, 2022
Created on Feb 17, 2022

A React application renders a pie chart of CSS named colors as SVG paths, using D3 to load the CSV data and compute the arc geometry. The code employs the React `useState` and `useEffect` hooks to fetch the data asynchronously and update the chart once loaded, while `d3.arc` and `d3.pie` handle the circular layout. Each slice is filled with its corresponding color hex value from the dataset, demonstrating a simple integration of D3 utilities within a React component.

AI-generated description

A program that loads in some data using D3 utilities and uses React state to keep track of the data.