Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
RRobinson Owino
Last edited Jun 3, 2019
Created on Jun 1, 2019
Forked from Making a Bar Chart

This example displays the populations of the ten most populous countries from the 2017 United Nations World Population Prospects, using a horizontal bar chart. It loads data from a CSV file with `d3.csv`, then maps values with `d3.scaleLinear` and `d3.scaleBand`, and renders axes via `d3.axisLeft` and `d3.axisBottom`. Rectangles are appended to an SVG container, with bar widths proportional to population, and the chart refreshes when the data promise resolves.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017.

MIT Licensed

Similar vizzes