Customizing Axes
This bar chart displays the top 10 most populous countries using 2018 UN population estimates, converted from thousands to raw numbers. The example emphasizes customizing D3 axes: the x-axis disables its domain, uses a custom tick formatter (converting 'G' to 'B'), and adds grid lines with negative tick sizes, while the y-axis removes its domain and tick lines entirely. It also styles tick text, axis labels, and the title via CSS. The visualization relies on D3 v5's `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` within an SVG rendering.
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.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.