Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart Horizontal

Public visualization

Viewing a saved revision (read-only)

8a95f4e6aa114c788b75c7030d9a2a6c

Bar Chart Horizontal

0 stars0🌍 Public
NNwaegerue Chinemerem
Last edited Apr 7, 2023
Created on Apr 3, 2023
Forked from Fork of D3 Starter

This horizontal bar chart displays population estimates for six countries, with each bar’s length scaled to its population value. The chart uses D3 v7 APIs including `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, with SVG rendering. A bottom axis labels ticks in abbreviated format (e.g., “B” for billions), while horizontal grid lines extend across the plot area. The y-axis labels are country names, and the x-axis is titled “population.” Data is hardcoded as an array of objects, with numeric populations derived by multiplying string values by 1000.

AI-generated description

A demonstration of how to start using D3 version 6.