Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Mmrdeevid
Last edited Mar 7, 2022
Created on Mar 7, 2022

This example displays a horizontal bar chart of the populations of the ten most populous countries, based on 2018 United Nations estimates. The chart uses D3 v7 with SVG rendering, relying on `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis. Data is loaded from a CSV file with `csv()`, and axes are drawn via `axisBottom` and `axisLeft`. Bars appear in steelblue, with dimensions mapped from population values and country names.

AI-generated description

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

MIT Licensed

Similar vizzes