Fork of Customizing Axes
This example displays a horizontal bar chart of the top 10 most populous countries in 2018, based on United Nations data loaded from a CSV. It shows the population values via bar lengths, with a custom tick format that converts large numbers into abbreviated suffixes like “B” for billions. The visualization builds on a basic bar chart by customizing D3 axes: removing domain lines, adding an axis label, and styling ticks using `d3.axisBottom`, `d3.axisLeft`, and `scaleBand`. It uses D3 v5 with SVG rendering, and the code imports specific modules like `csv` and `scaleLinear`.
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.