Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

c86f7c41cf8a4e90a0e1d884e6a867f5

Making a Bar Chart

0 stars1🌍 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.