Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Margin Converntion

Public visualization

Margin Converntion

0 stars1🌍 Public
SSamirAhma
Last edited Nov 25, 2022
Created on Nov 25, 2022

This example displays a horizontal bar chart of the top 10 countries by 2020 population, drawn with SVG rectangles. The code loads the dataset with `d3.csv`, uses React state to manage the data, and applies the margin convention by translating an inner group. `d3.scaleBand` and `d3.scaleLinear` position the bars, while `max` scales the width axis.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed