Skip to main content
Public

Share visualization

Loading preview…

Loading Data with React & D3 - JAT

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

Loading Data with React & D3 - JAT

1
JJason Tiller
Last edited Mar 3, 2021
Created on Mar 2, 2021

This example displays metadata about CSS named colors—file size, row count, and column count—in large text. It loads a CSV dataset from a GitHub gist using D3’s `csv` utility, then stores the parsed data in React state via the `useState` and `useEffect` hooks. After fetching, a custom message function formats the statistics for display. The rendering relies on React 17 and D3 v6, with the data source defined as a raw URL. While loading, the text shows “Loading …” until the asynchronous fetch completes.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities and uses React state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed