Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data in react

Public visualization

Viewing a saved revision (read-only)

6718aa78a2db42e0abd273e2845bbf90

Loading data in react

0 stars0🌍 Public
AAnthoVDO
Last edited Apr 22, 2021
Created on Apr 22, 2021
Forked from Mouse Follower

This example demonstrates asynchronous data loading in a React application using D3. It fetches a CSV file containing CSS named colors and displays the file size in kilobytes once the data arrives, showing a "loading" message beforehand. The code uses React hooks (`useState`) to manage the data state and the `csv` function from D3 to parse the remote CSV. The text updates dynamically through React's rendering, with the data size calculated using `d3.csvFormat`.

AI-generated description

I test to load data with D3 and react