Fork of Making a Bar Chart
✓ Published0🌍 Public
This example shows a horizontal bar chart of the top 10 most populous countries, using 2018 estimates from the United Nations World Population Prospects. The chart uses D3 v5 with an SVG rendering, scaling population values via `d3.scaleLinear` and country names via `d3.scaleBand`. It customizes the axes with `d3.axisLeft` and `d3.axisBottom`, applies a `.3s` tick format that replaces “G” with “B”, and removes default axis domain lines. The data is loaded from a CSV file using `d3.csv`.
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. It also demonstrates customization of D3 axes.
MIT Licensed