Skip to main content
Public

Share visualization

Loading preview…

Loading Data with React D3

vizhub.com

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

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

0 stars1Public
CChris Briggs
Last edited Nov 13, 2021
Created on Nov 13, 2021
Forked from Mouse Follower

This example demonstrates how to load external data into a React application using D3 utilities, displaying a summary message about the dataset after it is fetched. It asynchronously loads a CSV file via the `csv` method from d3.v5, storing the result in React state with the `useState` and `useEffect` hooks. The message, generated by a custom `message.js` function, reports the file size in kilobytes, row count, and column count using `d3.csvFormat` and properties like `data.length` and `data.columns`. While loading, the UI shows a placeholder text.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed