{"version":"1.0","type":"rich","title":"The Margin convention","description":"This example demonstrates how D3’s margin convention works by rendering a horizontal bar chart of the top ten countries by 2020 population estimates from the UN World Population Prospects 2019 dataset. The chart uses a React component with `d3.csv` to load data, `scaleBand` for the categorical y-axis, and `scaleLinear` for the x-axis. An outer SVG with fixed width and height contains a translated group element (`g`) that positions the bars inside the margin-defined inner area, which is computed by subtracting the top, right, bottom, and left margin values from the outer dimensions.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/eb6ca0e1b4734e8c9064b76d205e642c?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}