Skip to main content
100%

Making a bar chart

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

Similar vizzes