Skip to main content
Public

Share visualization

Loading preview…

Rendering Data with React

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Rendering Data with React

0
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.

Comments

Sign in to join the discussion.

MIT Licensed