🌍 Public
Viewing a saved revision (read-only)
301e761a5cd44c81b0aa1ce7de26fdb2
Fork of Responsive Bar Chart
This example shows the top 10 most populous countries as horizontal bars, with each bar’s length proportional to population in thousands. The chart automatically resizes to fit its container using the `observeResize` API, while the `viz` function builds scales with `d3.scaleBand` and `d3.scaleLinear`, draws axes via `@curran/responsive-axes`, and renders bars as SVG rectangles. Data comes from the `@curran/un-population-estimates-2024` dataset, sorted using `d3.descending`. An inner gray rectangle frames the plot area.
AI-generated descriptionA responsive bar chart.