{"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 10 countries by 2020 UN population estimates, loaded via `d3.csv`. The visualization shows bars scaled by population using `scaleLinear` for the x-axis and `scaleBand` for categorical country labels on the y-axis. The chart is built with React, using hooks like `useState` and `useEffect` to fetch and store data, and rendered as SVG with a `<g>` element translated by the margin object (top, right, bottom, left) to position the plotting area correctly within the 960×500 canvas.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ce822d34d81d462a8a9fcf00fc58f16e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}