Skip to main content
100%

Rendering data with React

✓ Published1🌍 Public
BbeauMarko
Last edited Feb 26, 2021
Created on Feb 26, 2021
Forked from Mouse follower

This example displays a vertical stack of colored stripes, one for each named CSS color, loaded from a remote CSV file using `d3.csv`. The React component uses `useState` and `useEffect` to fetch the data asynchronously and render each row as a `<div>` with a background color set from the `RGB hex value` column. D3 v5 handles the data loading, while React manages the rendering state, showing a loading message until the data arrives. SVG elements appear only in a commented-out fallback within the HTML, not in the active visualization.

AI-generated description

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

MIT Licensed

Similar vizzes