Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering (barchart)(Axis : the margin convention) data with react and d3

Public visualization

Fork of Rendering (barchart)(Axis : the margin convention) data with react and d3

0 stars0🌍 Public
AAmine HAMOU
Last edited Sep 1, 2021
Created on Aug 17, 2021

This example shows a horizontal bar chart of the top ten countries by 2020 population, loaded from a CSV file using d3.csv and rendered as SVG elements. React manages the data state and maps each row to a styled rectangle, with d3-scale’s scaleBand and scaleLinear computing the bar positions and widths. The chart applies a simple margin convention using a translated group element, and d3.v5 utilities fetch and parse the numeric population values before React re-renders the visualization.

AI-generated description

A program that loads in some data aboutt css named colors using d3 utilities, and uses React state to render the data

Comments

Sign in to join the discussion.

MIT Licensed