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
SSung Lee
Last edited Feb 28, 2021
Created on Feb 27, 2021

This example shows a vertical stack of colored horizontal bars representing CSS named colors from a CSV file, loaded via the `d3.csv` utility. The React `useState` and `useEffect` hooks manage the asynchronous data loading and trigger a re-render once the data arrives. Each row displays a bar with its background color set to the `RGB hex value` column. While the data loads, a simple "Loading..." message appears. The code uses React 16.9, D3 v5, and renders divs directly through `ReactDOM.render`.

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