Skip to main content
Public

Share visualization

Loading preview…

Scientific Data Visualization ICE-6 Working with react and d3.js

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

Scientific Data Visualization ICE-6 Working with react and d3.js

0
SSravyaAnnadi
Last edited Jun 26, 2022
Created on Jun 26, 2022

This visualization displays the cumulative Monkey Pox cases for the top 20 countries, using a horizontal bar chart rendered as an SVG. The chart employs React’s `useState` and `useEffect` hooks to asynchronously fetch CSV data via `d3.csv`, then maps each country’s population count to bar widths using `d3.scaleBand` and `d3.scaleLinear` for the y- and x-axes. Gridlines and ticks are generated with `d3.scaleLinear.ticks`, and all visual elements are constructed through React DOM creation. The bars are styled pink via CSS, with blue axis labels and red gridlines.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed