Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

f65efdb08f21430e8ffd6dae5663ac2a

Making a bar chart

0 stars2🌍 Public
SSamuel Elbaz
Last edited Oct 28, 2019
Created on Oct 28, 2019
Forked from Making a bar chart

This example displays a horizontal bar chart of country populations, sourced from a CSV file and rendered as an SVG. The D3.js library maps population values to bar lengths using a linear scale, while country names define the categorical axis. Explicitly coded axis generators, `axisLeft` and `axisBottom`, place labels for interpretation. The bars are drawn by appending `rect` elements, whose width is derived from the scaled population data, and the visualization is styled with steelblue fills, as seen in the accompanying CSS.

AI-generated description