{"version":"1.0","type":"rich","title":"The Margin Convention","description":"This example demonstrates the Margin Convention, a fundamental layout pattern for D3 visualizations, using a horizontal bar chart of the ten most populous countries in 2020. The chart loads UN population data via `d3.csv`, then renders SVG rectangles with React components. The visualization shows how margins create an inner plotting area, with `d3.scaleBand` mapping country names to the y-axis and `d3.scaleLinear` scaling population values to the x-axis. The code explicitly calculates `innerHeight` and `innerWidth` by subtracting margins from the total dimensions, and applies the margin offset through an SVG `<g>` transform.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/b758efbcbf674c50af396d2c29ad0b15?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}