Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data with React & D3

Public visualization

Loading Data with React & D3

0 stars0🌍 Public
TTrustPaul
Last edited Nov 26, 2020
Created on Nov 26, 2020

This example demonstrates loading CSS named color data from a remote CSV file using D3’s `csv` utility, then rendering each color as a horizontal stripe via React state and the `useEffect` hook. The app displays a temporary “Loading…” message until the data arrives, after which it maps the rows to colored divs. It uses React 16.9 and D3 v5, with the data sourced from a gist by Curran.

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