Skip to main content
100%

refactored barchart

✓ Published1🌍 Public
Mmarianamartins87
Last edited Mar 13, 2021
Created on Mar 6, 2021

This example displays the top 10 most populous countries from the United Nations World Population Prospects 2019 dataset as a horizontal bar chart with axes, tick labels, and a title. Refactored into reusable React components, the visualization uses d3.scaleBand for the y-axis, d3.scaleLinear for the x-axis, and formats population values with d3.format. SVG renders the bars, while axis components (AxisBottom, AxisLeft) and Marks generate the graphical elements. The tooltipFormat function provides abbreviated population values on hover via native SVG title elements.

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