Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React & D3 cont

Public visualization

Rendering Data with React & D3 cont

0 stars1🌍 Public
DDanny Stephens
Last edited Sep 5, 2021
Created on Sep 5, 2021

This example displays a vertical stack of thin color bars representing CSS named colors, loaded from a CSV file of color names and hex values. The data is fetched using D3’s `csv` utility and stored in React state via the `useState` and `useEffect` hooks. Each row renders as a div with its background color set to the corresponding hex value, producing a continuous gradient strip. React manages the rendering pipeline, while D3 only handles the data loading.

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.

Comments

Sign in to join the discussion.

MIT Licensed