{"version":"1.0","type":"rich","title":"Margin Convention","description":"This example demonstrates the margin convention in D3 by rendering a horizontal bar chart of the top ten countries by 2020 population from a UN dataset. The chart uses React state to load the CSV data via `d3.csv`, then maps it to SVG rectangles positioned with `d3.scaleBand` and `d3.scaleLinear`. The outer `<svg>` is sized to 960×500, while an inner `<g>` element is translated by margin offsets, showing how to reserve space for axes or labels. The visualization highlights reusable patterns for combining React with D3’s data utilities.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/d43da7540f6446678f581b6f85f9578b?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}