Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
JJYK
Last edited Mar 1, 2021
Created on Mar 1, 2021

This example demonstrates how React manages asynchronous data loading for a D3 visualization. It fetches a CSV file of CSS named colors using the `csv` utility from D3 v5, then displays summary statistics about the dataset—size in kilobytes, row count, and column count—in a simple text format. The React `useState` hook tracks the loaded data, while `useEffect` triggers the D3 fetch operation once on component mount. The `message` helper formats the statistics using `d3.csvFormat` to calculate byte length.

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