Skip to main content
100%

refactor bar chart

✓ Published1🌍 Public
NNart Williamson
Last edited Apr 28, 2021
Created on Apr 28, 2021

This example visualizes the top 10 most populous countries as a horizontal bar chart, with country names on the y-axis and population values on the x-axis, rendered as SVG via React components. The chart uses `d3.scaleBand` and `d3.scaleLinear` to map data from the United Nations World Population Prospects 2019 dataset. Axis and mark components are split into separate React files, with `Marks.js` drawing rectangles and `AxisBottom` and `AxisLeft` adding ticks and labels, demonstrating a refactored modular architecture.

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.

MIT Licensed

Similar vizzes