Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data using react and D3

Public visualization

Viewing a saved revision (read-only)

a12a135774a846d5a8355ffdb581c0c2

Rendering data using react and D3

0 stars1🌍 Public
LLainu Kuruvilla
Last edited Jan 12, 2022
Created on Jan 12, 2022

This example renders the CSS named colors dataset as a vertical sequence of colored strips, one per color, using React to manage state and update the DOM. It loads the CSV data with d3.csv and stores it in React state via the useEffect hook. Each strip’s background color is set from the “RGB hex value” field, with a fixed width of 960 pixels and a height of 4 pixels. The visualization demonstrates a simple, data-driven layout where React handles rendering and D3 handles data fetching.

AI-generated description

Rendering data using react and D3