Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

c334a4d2c06f4e7bb1ce35df65e9c0bf

Making a Bar Chart

0 stars1🌍 Public
Bbattlescarredshogun
Last edited Jan 30, 2020
Created on Jan 28, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of population by country, with bars scaled linearly along the x-axis and sorted alphabetically along the y-axis. The code uses d3.csv to load the data, d3.scaleLinear and d3.scaleBand to compute positions, and d3.axisLeft and d3.axisBottom to render the axes via SVG. The bars are appended as SVG rect elements with a steelblue fill.

AI-generated description