Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rending data with react

Public visualization

Viewing a saved revision (read-only)

f8c71c13047d49fe93a192c960cea36e

Rending data with react

0 stars1🌍 Public
JJacob Pingel Lauridsen
Last edited Jan 13, 2023
Created on Jan 13, 2023

This example renders the CSS named colors as a vertical stacked bar chart, with each color occupying a thin rectangular slice across the width of the viewport. The visualization loads the color data from a CSV file using D3’s `csv` utility, then maps each row to a styled `<div>` element with a background color set to the RGB hex value from the dataset. React manages the asynchronous data loading through the `useEffect` hook and renders the list of colored strips once the data arrives.

AI-generated description

A program that loads in some data about CSS named colors using D3 utillities, and uses React to render the data