Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

12.00 Making A Bar Chart with React & D3

Public visualization

12.00 Making A Bar Chart with React & D3

0 stars1🌍 Public
EEric Weiss
Last edited Apr 9, 2021
Created on Apr 9, 2021

This example shows a horizontal bar chart of the top 10 most populous countries in 2020, rendered as SVG rectangles. The visualization uses React for component state and rendering, while D3’s `d3.csv` loads and parses the UN population dataset, and `d3.scaleBand` and `d3.scaleLinear` map country names and population values to pixel coordinates. Data is filtered to the first ten rows, and the bars are drawn inside a `<svg>` element via React’s JSX mapping.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed