Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a barchart

Public visualization

Making a barchart

1 star0🌍 Public
OOliver Wills
Last edited Jun 18, 2020
Created on Jun 18, 2020

A horizontal bar chart displays population figures for major global cities, sorted alphabetically by city name. The visualization uses D3 v5 with SVG rendering to draw steel-blue bars whose widths represent each city's population value. It employs `d3.csv` to load the data, `scaleLinear` and `scaleBand` for positioning, and `axisBottom` with a custom tick formatter that abbreviates numbers using SI prefixes converted from G to B. The chart includes a title and removes extraneous domain lines from the categorical y-axis.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed