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)

6cb042b5b7c3413ba8d97cb3bffeaf93

Fork of Loading Data with React & D3

0 stars0🌍 Public
Nnonbots
Last edited Apr 7, 2021
Created on Apr 7, 2021

This example visualizes CSS named colors as a radial pie chart, with each color occupying an equal arc segment around a central point. The code loads color data from a CSV file using `d3.csv` and manages the asynchronous loading state with React’s `useState` and `useEffect` hooks. Rendering is done via React components that produce SVG elements, with each slice drawn using `d3.arc` and fill colors set from the `RGB hex value` column in the dataset. While data loads, a simple text placeholder appears.

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.