{"version":"1.0","type":"rich","title":"Making a Bar Chart in React & D3","description":"This example shows a horizontal bar chart of the top 10 most populous countries for 2020, using a dataset from the UN Population 2019 CSV loaded via `d3.csv`. React’s `useState` and `useEffect` hooks manage the asynchronous data fetch and re-render the bars once loaded. D3’s `scaleBand` and `scaleLinear` map country names and population values to SVG `rect` coordinates and widths, with each bar’s height derived from `yScale.bandwidth()`. The chart renders purely as SVG inside a React component.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ea65c707fd804c7386eea69691b24fac?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}