🌍 Public
Viewing a saved revision (read-only)
4793eb29b22643dea2a048546bd1019f
Fork of Loading Data with React
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