Skip to main content
Public

Share visualization

Loading preview…

Fork of 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

Fork of Let's make a Bar Graph with D3.js

1
AAishwarya Manjunath
Last edited Mar 7, 2022
Created on Mar 7, 2022

This example shows a horizontal bar graph of population by country using data from a CSV file. The bars are rendered as SVG rectangles in steel blue, with countries on the y-axis and population values on the x-axis. The code uses `d3.csv` to load the data, `d3.scaleLinear` for the x-scale, `d3.scaleBand` for the y-scale, and `d3.axisLeft` and `d3.axisBottom` to draw the axes. Population values are multiplied by 1000 before rendering.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed