Skip to main content
100%

Colour Part II - Rendering with React

✓ Published1🌍 Public
Ggeorgie-flood
Last edited Oct 17, 2023
Created on Oct 17, 2023

This example renders a stacked list of CSS named colors as horizontal strips, creating a full-spectrum swatch from a CSV dataset. The `App` component loads the data with `d3.csv`, stores it in React state via `useState` and `useEffect`, and maps each row to a `<div>` whose background color is set from the `RGB hex value` field. React handles the SVG-free, DOM-based rendering, while D3 only handles data loading.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to render the data.

MIT Licensed

Similar vizzes