Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Pathetic Bar Chart

Public visualization

Viewing a saved revision (read-only)

a8b1a437dafd4111b73d8377e401591c

Fork of Fork of Pathetic Bar Chart

0 stars0🌍 Public
Kkrithika
Last edited Nov 24, 2021
Created on Nov 24, 2021

This example displays the top 10 most populous countries in 2020 as horizontal bars, with no axes or labels, creating a deliberately minimal "pathetic" bar chart. It uses React hooks to fetch and load data from a CSV file sourced from the United Nations World Population Prospects 2019, then renders SVG rectangles with d3.scaleBand for the y-axis positioning and d3.scaleLinear for the x-axis widths. The code also includes margins and an inner height calculation for the chart area, though the visible output omits tick marks and gridlines.

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.