Customizing Axes
✓ Published2🌍 Public
This example displays a horizontal bar chart of the top ten most populous countries, using 2018 estimates from the United Nations World Population Prospects. The D3 v6 code imports `select`, `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, `axisBottom`, and `format` to construct the visualization. It customizes the x-axis by using a formatter that converts large numbers to abbreviated units and replaces the default "G" suffix with "B". Axis grid lines extend across the chart, while the y-axis labels and domain lines are removed, and the chart is rendered as SVG.
AI-generated descriptionThe data comes from the year 2018 estimate in World Population Prospects 2017.
MIT Licensed