🌍 Public
Viewing a saved revision (read-only)
abaa76974eab44c389902b65499ac011
Making a Bar Chart
This example uses D3 v5 to render a bar chart of the world’s most populous countries, based on 2018 United Nations population estimates. It reads data from a CSV file and displays each country’s population as a horizontal bar, using `d3.csv` for loading, `scaleLinear` for the x-axis, `scaleBand` for the y-axis categories, and `axisLeft`/`axisBottom` for labeled ticks. SVG elements are appended and styled with a steelblue fill.
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.