{"version":"1.0","type":"rich","title":"XYAxis with React & D3 with refactoring","description":"This example shows a horizontal bar chart of population data for the top 10 countries in 2020, with axes rendered as SVG elements. The React components `AxisBottom`, `AxisLeft`, and `Marks` repurpose D3 scales—`d3.scaleBand` and `d3.scaleLinear`—to compute positions and sizes. The bottom axis uses `xScale.ticks()` for tick values, while the left axis maps country names from the data domain. Data is loaded asynchronously from a CSV via `d3.csv` and the React hook `useEffect`. The visualization demonstrates clean separation of axis and mark rendering through reusable, refactored functions.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/1f5e602869174f3898a8d22c9b8fd41d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}