Skip to main content
Public

Share visualization

Loading preview…

Stylized 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

Stylized Bar Chart

CCurran Kelleher
Last edited Dec 15, 2020
Created on Sep 18, 2019

This example displays the top 10 most populous countries as a horizontal bar chart, with country names on the y-axis and population on the x-axis. It is built using React and D3 v5, relying on `scaleBand` and `scaleLinear` for positioning, and SVG for rendering. The data comes from the United Nations World Population Prospects 2019 dataset, loaded via `d3.csv`. Axis components (`AxisBottom`, `AxisLeft`) and bar marks (`Marks`) are custom React components, with tooltips provided by SVG `<title>` elements and population labels formatted using `d3.format`.

AI-generated description

A program that shows the top 10 most populous countries as a bar chart.

Data: United Nations World Population Prospects 2019.

Comments

Sign in to join the discussion.

MIT Licensed