Skip to main content
Public

Share visualization

Loading preview…

Fork of Load Data with React

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Load Data with React

1
11godfrey
Last edited Mar 5, 2023
Created on Mar 5, 2023

This example displays all CSS named colors as a vertical stack of horizontal color swatches. It loads the data from a remote CSV file using the `d3.csv` utility. The application then maps each data row to a React `<div>` element, setting its background color to the `RGB hex value` field and rendering it as a 4-pixel-high strip. The visualization uses React with hooks like `useState` and `useEffect` to manage the asynchronous data loading and rendering, and it displays a loading message before the data arrives.

AI-generated description

A program that loads in some [data about CSS named colors].(https://gist.github.com/1godfrey/b75a398c6dee927066e4224e9b633287) using D3 utilities, and uses React to render the data.

Comments

Sign in to join the discussion.

MIT Licensed