{"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 top 20 countries by 2020 population from a UN dataset. The chart displays country names along the y-axis and population values along the x-axis, with bars colored uniformly. The code uses React hooks to load CSV data via `d3.csv`, then employs `d3.scaleBand` and `d3.scaleLinear` for scaling, while rendering SVG rectangles inside a transformed group element to accommodate the specified margins.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/d9e46ba9583849d6ad48b4b4abb63e4b?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}