Skip to main content
Public

Share visualization

Loading preview…

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

Axes with React & D3

1
TThiago Sawada
Last edited Mar 2, 2023
Created on Apr 15, 2021

A React and D3 bar chart displays the top 10 most populous countries using UN population data from 2019, with bars representing 2020 projections. The visualization includes custom axes built manually through React components, using `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis. D3's `csv` loader fetches the dataset, while tick marks are generated via `xScale.ticks()`. The SVG rendering maps each country's population to bar widths, with axis labels positioned using React's JSX syntax.

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