Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Making a Bar Chart

0 stars1🌍 Public
TTsing
Last edited Nov 11, 2019
Created on Nov 11, 2019

This example shows a horizontal bar chart of the ten most populous countries, using population values from a CSV file. The chart orders countries along the y-axis with a band scale, while a linear scale maps population to bar length on the x-axis. Built with D3 v5, the SVG rendering uses `d3.scaleLinear`, `d3.scaleBand`, `d3.axisLeft`, `d3.axisBottom`, and `d3.csv` to load and prepare the data. Steelblue rectangles represent the bars, with axes and labels styled via CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed