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
KKonJoDot
Last edited Oct 21, 2022
Created on Oct 21, 2022

This example displays CSS named colors as horizontal swatches stacked vertically, each rendered as a colored div. It fetches the CSS named colors dataset from a GitHub gist using D3’s `csv` utility, then stores the parsed result in React state via the `useState` and `useEffect` hooks. While the data loads, the interface shows a large “Loading…” message; once loaded, it maps each row to a div whose background color matches the row’s RGB hex value, creating a full-width color spectrum strip.

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