Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Bar Chart

Public visualization

Pathetic Bar Chart

0 stars0🌍 Public
NNigel
Last edited Aug 30, 2022
Created on Aug 30, 2022

This example presents a bar chart of the ten most populous countries in 2020, sourced from a UN population dataset loaded via D3’s `csv` utility. The visualization uses React state to hold the parsed data, and D3’s `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis, which map country names and population values to SVG rectangles. The chart renders within an SVG element, with each bar’s width proportional to its population, while the interface displays a loading message until the data arrives.

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