{"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 ten most populous countries in 2020, using data from the UN Population dataset. The chart scales country names with `d3.scaleBand` and population values with `d3.scaleLinear`, then draws SVG rectangles inside a translated group element. The code loads the CSV via `d3.csv`, manages state with React hooks, and renders the visualization with React DOM, enforcing consistent margins around the plotting area.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/82ba141c4ca14b54b5317e6d9c433dc9?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}