Skip to main content
100%

Fork of Responsive Bar Chart

✓ Published0🌍 Public
Hhermelami@gmail.com
Last edited Mar 21, 2024
Created on Mar 21, 2024

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 description

A responsive bar chart.

MIT Licensed

Similar vizzes