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)

1fbe329f09ab41d7ba9a308f152ce49a

Fork of Loading Data with React & D3

0 stars1🌍 Public
KKenneth Silvere
Last edited Jun 19, 2021
Created on Jun 19, 2021

This example renders a donut chart of CSS named colors, with each slice colored by its corresponding hex value. The visualization fetches data from a CSV file using the `d3.csv` utility and manages the loading state through React hooks (`useState` and `useEffect`). The chart is drawn as SVG paths generated with `d3.arc`, positioned using a translation transform. React 16.9 and D3 v5 handle the data flow, while the page displays a loading message until the dataset 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.