Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Use d3 arcs

Public visualization

Viewing a saved revision (read-only)

0c29866816d846999300ac6c9adcec60

Use d3 arcs

0 stars1🌍 Public
JJohn Patrick Banas
Last edited Sep 10, 2021
Created on Sep 10, 2021

This example visualizes a dataset of CSS named colors as a pie chart, with each slice filled using its corresponding RGB hex value. The visualization leverages React state to manage asynchronous data loading via D3’s `csv` utility. D3’s `pie` generator computes the arc angles, while the `arc` function renders the SVG paths. The chart is centered on an SVG canvas, and the data source is a remote gist containing color names and hex codes.

AI-generated description

A program that loads in some data about CSS colors using D3 utilities, and uses React state to keep track of the data.