Fork of Loading data with React & D3.
✓ Published1🌍 Public
Using React and D3, this example loads a CSS named colors dataset from a GitHub gist and renders it as a series of horizontal color bars. The visualization displays each color as a 960-pixel-wide, 4-pixel-tall div, with the background color set from the `RGB hex value` column. It demonstrates asynchronous data loading with D3’s `csv` function and React’s `useEffect` and `useState` hooks, showing a "Loading..." message until the data arrives. The app uses React 17 and D3 6 via UMD builds, with styling defined in an external CSS file.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed