{"version":"1.0","type":"rich","title":"4: The Margin Convention (From Bar Chart)","description":"This example visualizes the top 10 countries by 2020 population as a horizontal bar chart, with bars colored using default SVG styling. The chart applies the margin convention by offsetting the plotting area using a `<g>` transform, then scales the data with `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis. Data is loaded asynchronously via `d3.csv` from a GitHub gist. React manages state and renders the SVG, while D3 v7 handles the data parsing and scale computations.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/0c5d6a4dcc374e82af352a896a5e960f?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}