🌍 Public
Viewing a saved revision (read-only)
2f7089e3bd9d41e7a4c62ea599bd7213
Making a Bar Chart
This example displays a horizontal bar chart of the populations of the ten most populous countries, based on 2018 United Nations estimates. The chart uses D3 v7 with SVG rendering, relying on `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis. Data is loaded from a CSV file with `csv()`, and axes are drawn via `axisBottom` and `axisLeft`. Bars appear in steelblue, with dimensions mapped from population values and country names.
AI-generated descriptionThis barchart shows population of the top 10 most populated countries. The data comes from the year 2018 estimate in United Nations: World Prospects 2017.