Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Pprat1507
Last edited Aug 28, 2019
Created on Aug 28, 2019

This example shows a horizontal bar chart ranking countries by population, using a CSV dataset of ten nations. The bars are rendered as SVG rectangles, with each country’s population scaled linearly across the chart width and country names positioned along a band scale. The code loads data with `d3.csv`, converts population values to thousands, and builds the chart using `d3.scaleLinear`, `d3.scaleBand`, and `d3.max` for domain calculation.

AI-generated description
MIT Licensed

Similar vizzes