Skip to main content
Public

Share visualization

Loading preview…

Loading Data the React & D3

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 the React & D3

0
Hhuashe418
Last edited Mar 19, 2022
Created on Mar 19, 2022
Forked from Mouse Follower

This example demonstrates how to load data with D3 utilities and manage it with React state. It fetches a CSV file from a GitHub gist using D3’s `d3.csv`, then displays a summary of the dataset via a React component. The summary shows the file size in kilobytes, the number of rows, and the number of columns, computed using `d3.csvFormat`. The visualization uses React’s `useState` and `useEffect` hooks to asynchronously load the data and update the display, rendering a plain-text message with a loading state initially.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed