Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

PieChart for CSS Colors

Public visualization

PieChart for CSS Colors

0 stars1🌍 Public
JJohn Patrick Banas
Last edited Sep 10, 2021
Created on Sep 10, 2021

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 description

A program that loads in some data about CSS colors using D3 utilities, and uses React state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed