Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering Data with React & D3

Public visualization

Fork of Rendering Data with React & D3

0 stars0🌍 Public
CChristopher Cleland
Last edited Sep 12, 2021
Created on Sep 12, 2021

This example displays CSS named colors as a vertical sequence of stacked horizontal bars, each colored by its corresponding hex value from a CSV dataset. The visualization loads data asynchronously using D3’s `csv` utility and manages the fetch state with React hooks (`useState`, `useEffect`), rendering a loading message until data arrives. React maps over the parsed CSV rows to produce the colored div elements, combining D3’s data-loading with React’s declarative component rendering.

AI-generated description

A program that loads in some data using D3 utilities, and used React state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed