Skip to main content
100%

Margins bar Chart

✓ Published1🌍 Public
JJohanna Magdalena
Last edited Nov 26, 2021
Created on Nov 25, 2021

This example displays a bar chart of the ten most populous countries, with vertical bars representing population sizes but no axes or labels. The code uses React to manage state and render SVG elements, while d3’s `scaleBand` and `scaleLinear` position and size the rectangles. It loads data from the United Nations World Population Prospects 2019 via `d3.csv`, and applies a fixed margin to a 960×500 SVG canvas. The chart emphasizes the importance of margins for visual framing, though it omits chart furniture.

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