Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Ep. 23 | Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

8f4de715c267460389c7f33ebaec3875

Ep. 23 | Refactored Bar Chart

0 stars1🌍 Public
YYee Han
Last edited Dec 24, 2020
Created on Dec 23, 2020

This example displays a horizontal bar chart of the top 10 countries by population from the United Nations World Population Prospects 2019 dataset. Rendered as SVG using React components, the chart uses d3.scaleBand and d3.scaleLinear for positioning, with custom AxisBottom, AxisLeft, and Marks components. The code demonstrates a refactored pattern where D3 is used for scales and data processing while React handles the DOM rendering, with d3.csv loading the data asynchronously via a useData hook.

AI-generated description

A program that loads in some United Nations World Population Prospects 2019.