Making a Bar Chart without React
This example displays a horizontal bar chart ranking the top 10 most populous countries, based on 2018 United Nations population estimates. The chart visualizes population values in millions, with a customized x-axis that abbreviates large numbers using the `d3.format` function. Built with D3 v5 (using `d3.select`, `d3.csv`, `d3.scaleLinear`, `d3.scaleBand`, `d3.axisBottom`, and `d3.axisLeft`), it renders to SVG. Axes are customized by removing domain lines and tick marks, with the y-axis labels and gridlines created using `.tickSize` and `.tickFormat`.
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.