{"version":"1.0","type":"rich","title":"React and D3 - Barchart with margins","description":"This example shows a horizontal bar chart displaying the top 10 countries by 2020 population, rendered as SVG rectangles within a React component. The chart uses D3’s `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis, with margins applied via a transformed `<g>` group. Data is loaded asynchronously from a CSV file using D3’s `csv` method and stored in React state with `useState` and `useEffect`.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/d4306158064d4e3b9af9376258df5e42?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}