Skip to main content
Public

Share visualization

Loading preview…

Fork of Refactored Bar Chart

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 Refactored Bar Chart

0
YYang Shun Yu
Last edited Sep 15, 2023
Created on Sep 15, 2023

This example displays the top 10 most populous countries as horizontal bars, with country names on the left axis and population values on the bottom axis. Built with React and d3.scaleBand, d3.scaleLinear, and d3.max, it loads data from the United Nations World Population Prospects 2019 CSV, parses the 2020 population column, and renders SVG rectangles via the Marks component. Axes are drawn using custom AxisBottom and AxisLeft components, forming a clean, readable bar chart.

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