Fork of Customizing Axes
This visualization displays a horizontal bar chart ranking the top 10 most populous cities using 2022 population estimates from World City Populations. The bars are styled with steelblue fills, and the chart features customized axes with tick marks, grid lines, and labels. The code uses d3.scaleLinear for the x-axis and d3.scaleBand for the y-axis, with d3.axisBottom and d3.axisLeft for rendering the axes. It also applies d3.format to abbreviate large population numbers, replacing 'G' with 'B' for billions. The visualization is rendered as an SVG.
AI-generated descriptionThis bar chart shows population of the top 10 most populous cities. The data comes from the year 2022 estimate in World City Populations 2022. It also demonstrates customization of D3 axes.
See also the first bar chart visualization that this one builds on: Making a Bar Chart.