Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Making a Bar Chart

0 stars0🌍 Public
PPrasanth Balaraman
Last edited Nov 20, 2021
Created on Nov 20, 2021
Forked from Hello VizHub

This example shows a horizontal bar chart of the ten most populous countries using data from a CSV file, with population values scaled in thousands. The visualization is built with D3 v7, using `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft` and `axisBottom` for the axes. SVG rectangles are appended to a group element, positioned with the band scale’s padding, and filled with steelblue via CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed