Skip to main content
100%

Ep. 23 | Refactored Bar Chart

✓ Published1🌍 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.

MIT Licensed

Similar vizzes