Skip to main content
Public

Share visualization

Loading preview…

Let's make a Bar Graph with D3.js

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

Let's make a Bar Graph with D3.js

33
SSurajQWERTY
Last edited Mar 4, 2022
Created on Feb 12, 2022
Forked from Hello VizHub

This bar chart displays the populations of the world’s most populous countries using horizontal bars, with countries on the y-axis and population values on the x-axis. The visualization reads population data from a CSV file and uses D3’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map values and render axes. Rectangles are appended to an SVG group to represent each bar, with the data converted to numeric values before rendering. The chart is built with D3 v7 and styled using steelblue fills.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed