Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

The Margin Convention

Public visualization

Viewing a saved revision (read-only)

5076a9c58196491fa788abd368294fc3

The Margin Convention

0 stars1🌍 Public
RRandyElkins
Last edited Aug 14, 2021
Created on Aug 14, 2021

This example displays the top 10 countries by 2020 population as horizontal bars within a fixed margin, demonstrating the SVG margin convention. The bars are scaled using `scaleBand` for the y-axis and `scaleLinear` for the x-axis, with React managing state and D3's `csv` loading the UN population data. A margin object defines the inner plotting area, and the SVG is translated accordingly to position the chart.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!