{"version":"1.0","type":"rich","title":"Setup the bars and margins","description":"This example shows a horizontal bar chart displaying the ten most populous countries in 2020. The bars are drawn inside a margin-defined area, with a band scale for country names on the y-axis and a linear scale for population on the x-axis. Using React hooks like `useState` and `useEffect`, it fetches CSV data from a GitHub gist via `d3.csv`, then renders SVG rectangles with `d3.scaleBand` and `d3.scaleLinear`. The visualization avoids overlapping edges by translating the chart group by the specified margins.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/2a9e7eca026245048849107186b8cb1e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}