Skip to main content
100%

Fork of Fork of Loading Data with React & D3

✓ Published1🌍 Public
Vvram80
Last edited Feb 28, 2021
Created on Feb 28, 2021

This example visualizes CSS named colors as horizontal bars, with each bar’s background color set to the color’s RGB hex value from the dataset. It uses React’s `useState` and `useEffect` hooks to manage asynchronous data loading, and D3’s `csv` utility to fetch the color data from a GitHub gist URL. While the data is loading, the display shows the text “Loading...” in large font. Once loaded, the bars render in a vertical stack, demonstrating how React state updates trigger re-renders with D3-loaded data.

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