Skip to main content
100%

Margins and Axes

✓ Published0🌍 Public
RRiccardo De Lucia
Last edited Aug 26, 2021
Created on Aug 26, 2021

This example displays the top 10 most populous countries as horizontal bars, with a y-axis labeling country names and an x-axis showing population counts with tick marks and gridlines. The visualization uses React for component structure and d3.scaleBand, d3.scaleLinear, and d3.max to compute scales and domain values directly from CSV data provided by the United Nations World Population Prospects 2019. SVG renderings are generated through d3-selection helpers, with margins applied via a translate transformation to position the chart content within the 960×500 viewport.

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