Skip to main content
100%

Reproducing the Bar Chart

✓ Published2🌍 Public
WWaseem Medhat
Last edited Oct 20, 2020
Created on Oct 20, 2020
Forked from HTML Starter

This example reproduces a bar chart ranking the ten most populous countries in 2020, sourced from the United Nations World Population Prospects 2019. It shows horizontal bars of varying lengths with a zero line, axis ticks, and a population title, using React components for rendering to SVG. The code employs D3 v6 scales (`scaleBand`, `scaleLinear`) for positioning, D3’s `format` for tick labels, and `csv` for data loading. Custom React components (`AxisBottom`, `AxisLeft`, `Marks`, `ZeroLine`) manage the visualization layout and styling.

AI-generated description

Replicating from scratch the bar chart created in Datavis 2020 (episodes 21-24).

MIT Licensed

Similar vizzes