Skip to main content
100%

Fork of Loading Data with React

✓ Published1🌍 Public
JJakub
Last edited Dec 10, 2021
Created on Dec 10, 2021

This example demonstrates loading and displaying CSS named colors from a remote CSV file. It shows a vertical stack of colored horizontal bars, one for each color, rendered as HTML divs whose background colors are set using the RGB hex values from the data. The React app uses the `useEffect` hook to fetch the CSV with `d3.csv` and stores the result in state via `setData`, initially showing a "Loading.." message. The code uses React 17, ReactDOM, and d3.v7, with the data sourced from a Gist.

AI-generated description
MIT Licensed

Similar vizzes