Dataviz 6 - Styling the bar chart
✓ Published0🌍 Public
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 descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed