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
LLívia Pinheiro
Last edited Aug 13, 2024
Created on Aug 13, 2024

This example demonstrates a minimal integration of React and D3 for loading and summarizing a local CSS named colors dataset. The interface displays a plain-text summary of the loaded data, including its size in kilobytes, row count, and column count, while showing a "Loading..." message before the data arrives. The application uses React's `useState` and `useEffect` hooks to manage asynchronous data fetching through D3's `csv` function, and a custom `message` module reports the data dimensions. The visualization is rendered via ReactDOM into a single `<pre>` element, with D3 v5 and React 16.9.0 loaded from CDNs.

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