Fork of Rendering Data with React & D3
This visualization displays population data for ten countries using a horizontal bar chart rendered as SVG. The bars have random colors, and each bar’s width is scaled proportionally to the population value. The chart includes labeled axes for population (formatted in billions) and country names. The code uses React hooks with D3’s `scaleBand`, `scaleLinear`, and `csv` to load data from the UN Population 2019 dataset. Custom React components (`AxisBottom`, `AxisTop`, `BarRect`) handle the chart’s rendering.