Skip to main content
100%

Activity 6_Question 1.2

✓ Published0🌍 Public
MMonish Galla
Last edited Apr 2, 2024
Created on Apr 2, 2024
Forked from Hello VizHub

This horizontal bar chart displays the population of 20 countries in 2010, sorted by country name, with bars extending from a shared left baseline. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. Population values are loaded from a remote CSV file via `d3.csv`, formatted with `format('.2s')` to show abbreviated labels like “1.2B”, and rendered as SVG rectangles with native tooltips. The code includes reusable axis components and applies a green fill to the bars.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes