Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Axes with React & D3

Public visualization

Fork of Axes with React & D3

0 stars0🌍 Public
KK V VINITHA
Last edited Mar 4, 2022
Created on Mar 3, 2022

This example displays a horizontal bar chart of the top 10 most populous countries, using React for the user interface and D3 v5 for the underlying data handling and SVG rendering. It loads the dataset from a remote CSV file, parses the 2020 population column, and maps each country name to a categorical y-scale while scaling the bar widths with a linear x-scale. The chart includes axis ticks and labels generated via D3’s `scaleBand`, `scaleLinear`, and `max` functions, with React components constructing the SVG elements.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

Comments

Sign in to join the discussion.

MIT Licensed