Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Responsive Bar Chart

Public visualization

Fork of Responsive Bar Chart

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed