The Margin Convention
✓ Published1🌍 Public
Tthomasjungcoe
Last edited Mar 12, 2021
Created on Mar 12, 2021
Forked from Rendering UN_Population_Data with React & D3
A horizontal bar chart displays the 2020 populations of nine countries, using the margin convention to position a bar plot inside a centered SVG group. React state manages the data loaded from a CSV of UN population figures, while D3 utilities (`csv`, `scaleBand`, `scaleLinear`, `max`) compute the scales and dimensions. The bars render as SVG rectangles, with the group translated by the specified margin values to align the chart within the 960×500 viewport.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed