Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Margin convention Visualizing World Population

Public visualization

Margin convention Visualizing World Population

0 stars1🌍 Public
Ggoyalshivam204
Last edited Jun 19, 2023
Created on Jun 19, 2023

This example visualizes the top ten most populous countries from the UN Population 2019 dataset, rendered as a horizontal bar chart using SVG. The chart displays each country’s population for the year 2020, with bars extending from the left margin. Built with React and D3 v5, the code uses `d3.scaleBand` for the y-axis categories and `d3.scaleLinear` for the x-axis population values, applying the margin convention—a transformed `<g>` element with explicit top and left margins. The data is loaded via `d3.csv` and filtered to the first ten rows.

AI-generated description

Loading and visualizing data about CSS named color using React and D3

Comments

Sign in to join the discussion.

MIT Licensed