Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
MMatthew Rubino
Last edited Jun 13, 2021
Created on Jun 3, 2021
Forked from Face Time

This bar chart displays population estimates for ten countries, with horizontal bars ranked by population size from largest to smallest. Rendered as SVG, the visualization uses D3 v6 scales to map population values to bar lengths and country names to bar positions. Its axes come from D3’s `axisLeft` and `axisBottom`, while bar heights rely on `scaleBand`’s bandwidth. Hovering over a bar turns it dark blue. The data loads from a CSV file via `d3.csv` and is preprocessed by multiplying each population value by 1,000, reflecting the source’s units in thousands.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes