Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Making a bar chart

0 stars0🌍 Public
AAdam Usmani
Last edited Feb 26, 2021
Created on Feb 17, 2021
Forked from Making a bar chart

This example shows a horizontal bar chart ranking the populations of ten countries, from China at the top to Mexico at the bottom. Using D3 v5, the code loads the data with `d3.csv`, maps population values with a linear scale, and positions bars with a band scale. It draws an SVG with `d3.axisLeft` for the country labels and a bottom axis created via a custom `axisBottom` call, while styling removes domain lines and ticks.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed