{"version":"1.0","type":"rich","title":"Refactored Bar Chart","description":"This example visualizes the population of ten countries from a UN dataset in 2019/2020 using a horizontal bar chart rendered as SVG. The code loads data with `d3.csv` in a React custom hook (`useData`), then builds the visualization with `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. Axis tick marks and labels are generated via custom React components (`AxisBottom`, `AxisLeft`), while `Marks` maps each country to a `<rect>` positioned by the computed scales, with margins applied through a translated `<g>` group.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/77e3401dbf524212a76f397ef18f3286?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}