Skip to main content
100%

The Margin Convention

✓ Published2🌍 Public
MMaciek Sitkowski
Last edited Sep 23, 2020
Created on Sep 23, 2020

This example demonstrates the D3 margin convention by rendering a horizontal bar chart of the top 10 countries by 2020 population, with a 50-pixel gutter on each side of the SVG canvas. The React app loads data from a CSV file using d3.csv, then uses scaleBand for the categorical y-axis and scaleLinear for the quantitative x-axis. Bars are drawn as SVG rectangles inside a translated group element.

AI-generated description
  • D3 Margin Convention
MIT Licensed

Similar vizzes