Skip to main content
100%

Dataviz 6 - Styling the bar chart

✓ Published0🌍 Public
RRyAlpha
Last edited Nov 24, 2021
Created on Nov 24, 2021

A horizontally oriented bar chart displays the ten most populous countries in 2020, with bars colored teal and axes labeled in muted gray. The visualization uses React components to render SVG elements, with `scaleBand` for the categorical country axis and `scaleLinear` for the population axis. D3’s `csv` loader fetches the UN World Population Prospects 2019 dataset, and tick labels are formatted with `d3.format` to abbreviate values like “1.3B”. A tooltip via SVG `<title>` elements shows exact population figures on hover.

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