Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
JJaohar Kehinde Oseni
Last edited Apr 29, 2020
Created on Apr 29, 2020
Forked from Making a Bar Chart

This example displays the top 10 most populous countries as horizontal bars, comparing 2018 population estimates from the United Nations. The code uses D3 v5 with SVG rendering, relying on `d3.csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to build the chart. Axes are customized by removing domain lines and formatting tick labels (e.g., converting “G” to “B” for billions), with a labeled x-axis and title. Population values are multiplied by 1000 to reflect the original UN data scale.

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