{"version":"1.0","type":"rich","title":"The margin convention","description":"This example demonstrates D3’s margin convention by rendering a horizontal bar chart of UN population data for the top ten countries in 2020. The chart uses React state to load the CSV via `d3.csv` and maps each country to a `<rect>` inside a translated `<g>` element, with scales from `d3.scaleBand` and `d3.scaleLinear`. All marks are drawn as SVG within a fixed 960×500 viewport, clearly separating the plotting area from the surrounding margins.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/1689555376934a76ade18fa75e52f933?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}