Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 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
MIT Licensed

Similar vizzes