Skip to main content
100%

Margin Convention

✓ Published1🌍 Public
Ttorstenaan
Last edited Feb 25, 2021
Created on Feb 25, 2021
Forked from Simple Bar Chart

This example shows a simple horizontal bar chart of the ten most populous countries, using data from the United Nations World Population Prospects 2019 dataset. The chart displays population values for 2020 as bars, with country names on the y-axis and a linear population scale on the x-axis. The visualization uses React to render SVG elements, while D3’s `csv`, `scaleBand`, `scaleLinear`, and `max` functions handle data parsing, scaling, and domain calculations. A fixed margin of 20 pixels on all sides positions the chart within a 960-by-500 pixel SVG canvas.

AI-generated description

Making a simple bar chart using data from United Nations World Population Prospects 2019 Dataset.

MIT Licensed

Similar vizzes