🌍 Public
PieChart for CSS Colors
This example visualizes CSS color data as a sequence of horizontal bars, each displaying a named color’s RGB hex value as its background. The app loads the dataset from a GitHub Gist using D3’s `csv` utility, then stores it in React state via the `useState` and `useEffect` hooks. Each row is rendered as a `div` element with inline styles for width and height, effectively creating a color swatch list. React 16.9 and D3 v7 are used together, with SVG elements commented out in the HTML template.
AI-generated descriptionA program that loads in some data about CSS colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed
Comments
Sign in to join the discussion.