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
Jjpdlourenco98
Last edited Sep 1, 2021
Created on Sep 1, 2021

This example visualizes the top 10 most populous countries as a horizontal bar chart, with the y-axis listing countries and the x-axis showing population counts. The chart uses React hooks (useState, useEffect) to fetch data from the United Nations World Population Prospects 2019 CSV, while D3 v5 provides the scaleBand and scaleLinear for positioning. Axes are manually constructed with D3’s tick generation and rendered as SVG elements, including vertical grid lines and text labels. The bars are simple SVG rectangles, with the chart wrapped in a React component and rendered via ReactDOM.

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