Skip to main content
100%

Rendering Data with React

✓ Published4🌍 Public
CCurran Kelleher
Last edited Sep 12, 2019
Created on Sep 12, 2019

This example visualizes CSS named colors as a vertical stack of colored horizontal bands, with each band’s height fixed at 4 pixels and width at 960 pixels. The data is loaded from a CSV file using D3’s `csv` utility, while React manages the asynchronous state with hooks like `useState` and `useEffect`. The rendering itself is pure React, mapping each row to a `div` whose background color is set from the CSV’s “RGB hex value” field. A loading message appears until the data arrives.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data.

MIT Licensed

Similar vizzes