{"version":"1.0","type":"rich","title":"Rendering barchart with React & D3","description":"This example renders a bar chart of the top 10 countries by 2020 population using React state to manage data loaded via D3’s `csv` utility. The visualization maps country names to vertical bands with `d3.scaleBand` and population values to horizontal bar lengths with `d3.scaleLinear`, drawing grid lines and rectangles as SVG elements. React hooks `useState` and `useEffect` trigger the asynchronous data fetch and re-render the chart once the CSV from a GitHub gist is parsed. The code leverages D3 v5 for scales and data loading while React handles component rendering.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ad277b9c69254690b203e9f9fee68b0a?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}