Skip to main content
100%

LoadingDataReactD3

✓ Published1🌍 Public
Cchristine
Last edited Oct 5, 2022
Created on Oct 5, 2022
Forked from Mouse Follower

This example demonstrates how to load external data into a React component using D3 utilities, with React state managing the loaded dataset. The code fetches a CSV file of CSS named colors from a GitHub gist via the `csv` function from d3-dsv, storing the parsed result in React’s `useState` hook. While the data loads, a message displays “Data is loadeding”; once complete, it updates to “Data is loaded.” The visualization also includes a yellow circle component with a black stroke, though its size and thickness are defined through React props. The project uses React 18, D3 v7, and relies on `useEffect` to trigger the data fetch only once.

AI-generated description

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

MIT Licensed

Similar vizzes