Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with React

Public visualization

Viewing a saved revision (read-only)

5e3b995a8d2e40218f9ed2738d47bb28

Rendering data with React

0 stars2🌍 Public
Ssophievanderhorst
Last edited Mar 1, 2021
Created on Feb 16, 2021
Forked from Hello HTML

This example demonstrates rendering a dataset of CSS named colors as a vertical sequence of colored rectangles, each with a fixed width and height. The visualization uses React’s `useState` and `useEffect` hooks to asynchronously load a CSV file via `d3.csv()`, then maps the rows into React `<div>` elements whose `backgroundColor` styles are set from the `RGB hex value` column. The code relies on React DOM rendering and D3 v6 for data fetching, presenting a simple, static strip of color swatches without interaction or animation.

AI-generated description

A bare minimum HTML page.