Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
RReshma R
Last edited Mar 27, 2019
Created on Mar 26, 2019

This example displays the population of the ten most populous countries, based on 2018 United Nations estimates from World Population Prospects 2017, as horizontal bars. The chart uses D3 v5 with `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisLeft` and `d3.axisBottom` for tick rendering. Data is loaded from a CSV via `d3.csv`, and each bar’s width is scaled proportionally to population values, multiplied by 1000. The SVG output is styled with steelblue rectangles.

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