Skip to main content
100%

The Margin Convention

✓ Published1🌍 Public
PPeter Krevenets
Last edited Mar 14, 2021
Created on Mar 14, 2021
Forked from Pathetic Bar Chart

This example shows a horizontal bar chart of the top ten most populous countries, using data from the United Nations World Population Data 2019. The chart is rendered as an SVG in a React component, with the bars sorted in descending order of population. The code builds the visualization using d3.scaleBand for the y-axis categories, d3.scaleLinear for the x-axis values, and d3.csv to load the data, positioning all elements within a defined margin using a translation transform.

AI-generated description

Using United Nations World Population Data 2019 and React to render a bar chart with margins.

MIT Licensed

Similar vizzes