Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Viewing a saved revision (read-only)

473ad9c730704f61ba2381074d8ce0e4

Fork of Loading Data with React & D3

0 stars0🌍 Public
NNicolás Troncoso
Last edited Apr 1, 2021
Created on Apr 1, 2021

This example demonstrates React state managing asynchronous data loading by fetching CSS named colors from a CSV file via D3’s `csv` utility. The app renders tiny colored squares based on each color’s RGB hex value, and a loading message appears until the data arrives. The visualization uses React hooks (`useState`, `useEffect`) to trigger the D3 data request and re-render the component when the promise resolves.

AI-generated description

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