Skip to main content
Public

Share visualization

Loading preview…

Fork of Visualization of data using 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

Fork of Visualization of data using React

0
Mmanvithareddykarra
Last edited Mar 6, 2022
Created on Mar 6, 2022

This example shows a pie chart with one wedge per data row, colored by a hex value from the CSV and rendered as an SVG. It loads a sample sales record from a GitHub gist using `d3.csv`, then passes the parsed data to React state via `useState` and `useEffect`. The chart uses `d3.pie()` and `d3.arc()` with an outer radius equal to the SVG width, and maps each pie slice to a `<path>` element. The code also includes an unused `message` utility that reports list length and column count.

AI-generated description

creating a react app, data hangling

Comments

Sign in to join the discussion.

MIT Licensed