Skip to main content
100%

The Margin Convention

✓ Published1🌍 Public
Bbsolomon103
Last edited Jan 2, 2022
Created on Dec 30, 2021

This example shows a horizontal bar chart of the ten most populous countries in 2020, with each bar’s length proportional to population. The visualization uses React to render SVG rectangles inside a `<g>` element translated by a margin object, while D3’s `csv` loads and parses the UN population data. `scaleBand` maps country names to vertical positions, and `scaleLinear` scales population values to bar widths within the inner chart dimensions. The chart omits axes and labels, focusing purely on the margin convention.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities and uses React to render the data.

MIT Licensed

Similar vizzes