{"version":"1.0","type":"rich","title":"Refactored BarChart","description":"This example shows a horizontal bar chart of population data for ten countries, drawn as SVG rectangles whose lengths encode each country’s 2020 population. The code uses React hooks (`useState`, `useEffect`) to load and transform the data via D3’s `csv` utility, then renders the chart with `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. Axis components and marks are extracted into separate React files, with D3’s `max` and scale functions driving the layout.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/46bdabddc59b4ab48dc8439e309a2671?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}