{"version":"1.0","type":"rich","title":"The Margin Convention","description":"This example demonstrates the margin convention in D3 by rendering a horizontal bar chart of the top 10 countries by 2020 population from UN data. The chart uses SVG rectangles positioned with `scaleBand` and `scaleLinear` scales, nested inside a translated `<g>` group to offset the visualization from the SVG edges. React hooks like `useState` and `useEffect` manage asynchronous data loading via `d3.csv`, while the margin object explicitly defines padding for the plot area.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/5ed835a9cc6d4eef89be7fa8131d19ec?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}