Skip to main content
100%

The Margin Convention

✓ Published1🌍 Public
JJacob Potvin
Last edited May 25, 2021
Created on May 21, 2021
Forked from Pathetic Bar Chart

This example uses React and D3 v5 to render a bar chart of the top 10 most populous countries from the United Nations World Population Prospects 2019 dataset. The chart deliberately omits axes and scales, displaying only bars whose lengths encode population values, while the margin constraints define the plotting area. Using `d3.csv` to load data, `d3.scaleBand` for the categorical y-axis, and `d3.scaleLinear` for the numeric x-axis, the SVG output calculates bar widths against a fixed inner width. The code also renders tick lines and labels for the x-axis, but no axis lines or y-axis tick marks, highlighting the conventional margin structure without full annotation.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes