Skip to main content
Public

Share visualization

Loading preview…

ICE-6_PY_DATA_VIZ: Rendering Marks and Channel w/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

ICE-6_PY_DATA_VIZ: Rendering Marks and Channel w/React

1
PPY09052021
Last edited Mar 6, 2022
Created on Mar 4, 2022
Forked from React Starter

This example shows a horizontal bar chart comparing the horsepower of ten cars, using SVG marks and channels rendered through React components. It imports data from a CSV file with d3.csv, then uses d3.scaleBand and d3.scaleLinear to map car names and horsepower values to screen positions. The code generates axis ticks and gridlines manually with JSX, while React’s useState and useEffect manage asynchronous data loading. D3 v5 and React 16.13.1 work together to produce the visualization.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed