Margin Barchart
✓ Published1🌍 Public
This example displays a horizontal barchart of the top 10 countries by projected 2020 population, using a margin convention to place the y-axis labels on the left. The chart is built with React and D3 v5, where `scaleBand` positions the categorical country names and `scaleLinear` maps population values to bar widths. Data is loaded asynchronously via `d3.csv` from a GitHub-hosted UN Population dataset, and each bar is rendered as an SVG `rect` inside a translated `<g>` group. The visualization shows how React manages state and renders D3 scales into SVG elements.
AI-generated descriptionprogram follows circle
MIT Licensed