🌍 Public
Viewing a saved revision (read-only)
e7a093b747534a3e81495b3498f95d0c
Making a Bar Chart
This example presents a horizontal bar chart of the population of the ten most populous countries, using 2018 estimates from the United Nations World Population Prospects. The visualization encodes population with bar length and country names along the y-axis, rendered as SVG rectangles. Built with d3.v5, it loads data from a CSV file and uses d3.scaleLinear and d3.scaleBand for axes, with d3.axisLeft and d3.axisBottom for labels. The code applies a steelblue fill to the bars via CSS.
AI-generated descriptionThis 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.