Skip to main content
100%

The Margin Convention

✓ Published1🌍 Public
JJoe Hutchins
Last edited Feb 20, 2022
Created on Feb 20, 2022
Forked from Pathetic Bar Chart

This example demonstrates the margin convention by rendering a horizontal bar chart of OECD population data for 2012. It shows ten countries with bar lengths proportional to their populations, using D3 scales for positioning and sizing within an SVG rendered by React. The code loads CSV data with `d3.csv`, applies a row-parsing function to convert strings to numbers, and uses `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The chart is nested inside a translated SVG group element to apply the margin spacing.

AI-generated description

A program that load in some data about CSS named colors using D3 utilities, and uses React to render a Bar Chart

MIT Licensed

Similar vizzes