Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
AAvisa Poshtkouhi
Last edited Jun 27, 2022
Created on Jun 27, 2022
Forked from D3 Starter

This example visualizes the population of the top 10 most populous countries using a horizontal bar chart, with data sourced from the 2018 United Nations World Population Prospects. The population values are displayed along the x-axis while country names are mapped to the y-axis using band scaling. The visualization uses d3.scaleLinear for the numeric axis, d3.scaleBand for categorical positioning, and d3.axisLeft and d3.axisBottom to render the chart’s axes. Rectangles represent each country’s population, and the SVG rendering is powered by D3 v3 and v7 modules, with CSS styling applied to the bars.

AI-generated description

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

MIT Licensed

Similar vizzes