Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering data with React

Public visualization

Fork of Rendering data with React

0 stars1🌍 Public
Ssophievanderhorst
Last edited Mar 2, 2021
Created on Mar 1, 2021

This example presents a pie chart of CSS named colors, rendered as SVG paths within a React application. The chart uses D3's `pie` and `arc` functions to compute the pie slices, which are then drawn as `<path>` elements with their fill colors set to the corresponding RGB hex values from the data. The data is loaded asynchronously from a CSV file using D3's `csv` method, and the visualization updates once the data arrives, initially displaying a "Loading..." message. The chart is centered on an SVG canvas with a width of 960 and height of 500 pixels.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed