Viewing a saved revision (read-only)
2d7af9bf2c1c42f7adad12c9ef8c145b
The Margin Convention
This example presents the top 10 most populous countries as a bar chart, deliberately omitting axes and labels to highlight the importance of margins in visualization layout. Built with React and D3 v5, it uses `scaleBand` for the y-axis positioning and `scaleLinear` for bar widths, with data from the United Nations World Population Prospects 2019. The SVG rendering applies a 20-pixel margin on all sides via a translated `<g>` element, demonstrating how padding frames the chart area. The visualization intentionally looks incomplete to emphasize that proper margins are a foundational convention for readable charts.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.