Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with React

Public visualization

Viewing a saved revision (read-only)

4cfe799a7b2d4c15a9e27e5e586d0c8c

Rendering data with React

0 stars1🌍 Public
FFarahnaz Wick
Last edited Feb 28, 2022
Created on Feb 25, 2022

This example visualizes the CSS named colors dataset as a pie chart, with each slice filled by the corresponding color’s hex value. React manages the asynchronous data loading and rendering state, while D3’s `csv`, `pie`, and `arc` utilities fetch the data and compute the pie geometry. The chart is drawn as SVG paths inside a React component, showing a simple integration of D3 for data processing with React for declarative UI updates.

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.