The margin convention
A bar chart displays the ten most populous countries in 2020, using data from the UN Population 2019 dataset. The visualization demonstrates the margin convention by placing scales and axes inside a translated SVG group, separating the plot area from the chart edges. React manages the component state and renders the SVG, while D3’s `csv`, `scaleBand`, `scaleLinear`, and `max` functions handle data loading, scaling, and axis generation. Tick marks and labels for both axes are generated from the scale domains, with bars sized by population values.