Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
AAbi360
Last edited Aug 9, 2021
Created on Aug 9, 2021

Loading data with React and D3 displays a grid of colored squares, each representing a CSS named color from a remote CSV file. The React component uses the `useState` and `useEffect` hooks to fetch the data via `d3.csv`, updating the component once the dataset arrives. While loading, the page shows a large "Loading..." message. After the data loads, it renders each row as a `div` whose background color is set to the color's `RGB hex value` from the CSV. The code imports React, ReactDOM, and the `csv` function from D3 v7.

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

Comments

Sign in to join the discussion.

MIT Licensed