π Public
Margin Converntion
SSamirAhma
Last edited Nov 25, 2022
Created on Nov 25, 2022
Forked from Fork of Fork of Rendering data with react
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 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
Comments
Sign in to join the discussion.