Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering Data with React & D3

Public visualization

Fork of Rendering Data with React & D3

0 stars0🌍 Public
Bbart
Last edited Jun 11, 2021
Created on Jun 11, 2021

This example displays CSS named colors as a horizontal stacked bar chart, where each color appears as a thin stripe in sequence. The visualization uses React to manage component state and rendering, while D3’s `csv` utility loads the color data from a remote GitHub gist. Data is fetched asynchronously with React’s `useEffect` and `useState` hooks, and the hex color values directly set each stripe’s background color. The code also includes commented-out logic for computing radial arcs using D3’s `arc` and `pie` functions, though the active rendering uses simple divs.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!

Comments

Sign in to join the discussion.

MIT Licensed