Skip to main content
100%

Making a Bar Chart

✓ Published2🌍 Public
LLukas Schießer
Last edited Mar 14, 2020
Created on Mar 14, 2020
Forked from Making a Bar Chart

This example shows the populations of the ten most populous countries in 2018, based on United Nations data, as horizontal bars ordered by rank. It demonstrates custom D3 axes with a linear x-scale for population and a band y-scale for country names. The code uses d3.csv to load the data, d3.scaleLinear and d3.scaleBand for scaling, and d3.axisLeft and d3.axisBottom to render the axes within an SVG container.

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. It also demonstrates customization of D3 axes.

MIT Licensed

Similar vizzes