{"version":"1.0","type":"rich","title":"The Margin Convention","description":"This example demonstrates the margin convention for bar charts, displaying the top 10 countries by 2020 population from a UN dataset. The chart renders horizontal bars using SVG `<rect>` elements, positioned with `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the quantitative x-axis. Data loads asynchronously via `d3.csv` into React state with `useEffect`, while margins are applied through a translated `<g>` group. The visualization shows how to separate chart dimensions from overall SVG size using explicit margin objects.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/f6024c849d114de6b925153549177147?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}