🌍 Public
Fork of Fork of Loading Data with React & D3
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 descriptionA 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
Comments
Sign in to join the discussion.