Customize Axes
✓ Published1🌍 Public
This example visualizes the populations of the top 10 most populous countries as horizontal bars, showing each country's total population. The chart uses a linear scale for the population axis and a band scale for country names, with customized tick formatting that abbreviates numbers (converting gigabyte notation to billions). The code leverages d3's `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft` to construct the axes, while `format('.3s')` handles number formatting. Data is loaded from a CSV file, with population values multiplied by 1000 during preprocessing.
AI-generated descriptionMIT Licensed