Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React

Public visualization

Viewing a saved revision (read-only)

c4ad0cb72c344b8388a3b99ac25b2f0f

Rendering Data with React

0 stars0🌍 Public
Yyinhao0424
Last edited Sep 16, 2019
Created on Sep 16, 2019

This example renders CSS named colors as a donut chart, where each color from the dataset is represented by a slice filled with its corresponding hex value. The visualization uses D3 utilities to load and parse the CSV data from a GitHub gist, while React manages the application state and conditional rendering for the loading state. The chart is drawn using SVG paths generated by D3’s arc and pie components, with ReactDOM rendering the final output.

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.