Skip to main content
100%

Bar Chart Horizontal

✓ Published0🌍 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.

MIT Licensed

Similar vizzes