Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Bar Chart

Public visualization

Pathetic Bar Chart

0 stars0🌍 Public
Jjunxiangyao
Last edited Dec 19, 2020
Created on Dec 19, 2020
Forked from Pathetic Bar Chart

This example renders the top 10 most populous countries as a bar chart with no axes, scales, or labels, making the bars appear "pathetic" and uninformative. The visualization loads population data from the United Nations World Population Prospects 2019 CSV, and uses React with hooks (`useState`, `useEffect`) to manage state. D3’s `csv`, `scaleBand`, `scaleLinear`, and `max` functions calculate bar widths and vertical positions, while each bar is an SVG `<rect>` element rendered inside a `<svg>` container.

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