Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Viewing a saved revision (read-only)

e9a59e867dda4dd082c7028ff73bbaf2

Fork of Loading Data with React & D3

0 stars0🌍 Public
Aatqlong
Last edited Jan 19, 2022
Created on Jan 19, 2022

This example visualizes the CSS named colors dataset as a donut chart, with each slice colored according to its corresponding RGB hex value. The visualization uses React state to manage loading the CSV data asynchronously through the `csv` utility from D3 v5. Once loaded, the data is rendered as SVG path elements using the `arc` generator from D3, with each slice’s angle proportional to its position in the dataset. The React component displays a “Loading…” message until the data arrives.

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.