Skip to main content
Public

Share visualization

Loading preview…

Making a 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

Making a Bar Chart

2
黃黃歆善
Last edited Sep 17, 2023
Created on Sep 17, 2023

A horizontal bar chart displays population figures for ten countries, from China to Mexico, with population values in thousands. The chart uses D3 v7’s `scaleLinear` and `scaleBand` to map population and country names, respectively, and renders bars as SVG `rect` elements. Axes are generated with `axisLeft` and `axisBottom`, while data is loaded from a CSV file via `d3.csv`. Steel-blue bars with labeled axes present the ranked population data clearly.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed