Skip to main content
100%

Making a bar chart

✓ Published0🌍 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
MIT Licensed

Similar vizzes