{"version":"1.0","type":"rich","title":"The Margin Convention","description":"This example demonstrates the Margin Convention by rendering a horizontal bar chart of the ten most populous countries from the 2019 UN Population dataset. The visualization uses React state to manage data loading via `d3.csv` and translates an SVG `<g>` element by the margin values to position the chart inside a 960×500 viewport. Bars are drawn with `scaleBand` for the y-axis (country names) and `scaleLinear` for the x-axis (population), with each rectangle’s width proportional to the data value. The code explicitly separates the outer SVG dimensions from the inner plotting area using the defined margin object.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/78daebd690fc446e817019fa65b57efe?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}