Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published0🌍 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.

MIT Licensed

Similar vizzes