Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

react d3 state example

Public visualization

react d3 state example

0 stars2🌍 Public
MMalcolm Mead
Last edited Jan 18, 2022
Created on Jan 16, 2022

This example shows a React application that fetches CSS named colors from a CSV file and renders them as a vertical stack of 900-pixel-wide horizontal bands, each colored by its corresponding RGB hex value. The visualization uses React’s `useState` and `useEffect` hooks to load data asynchronously via d3’s `csv` function, mapping each row to a styled `div`. A separate `BackgroundCircle` component (not used in the main view) defines a yellow circle with black stroke, while the `message.js` module computes data statistics. The page is styled with a large `pre` element as a placeholder.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed