Skip to main content
Public

Share visualization

Loading preview…

Fork of Axes with React & D3

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 Axes with React & D3

0
KKtuzinowski
Last edited Jul 25, 2021
Created on Jul 25, 2021

This example visualizes the top 10 most populous countries as a horizontal bar chart using React state management and D3 scales. The code loads the United Nations World Population Prospects 2019 dataset via `d3.csv`, then uses `scaleBand` and `scaleLinear` to map country names and population values to SVG rectangles. Hand-rolled axis ticks are generated with `xScale.ticks()`, and the visualization renders through ReactDOM, with SVG elements created directly in JSX rather than using `d3.axis`.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

Comments

Sign in to join the discussion.

MIT Licensed