Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Question 1.2

Public visualization

Viewing a saved revision (read-only)

bb4e4b836c05440882ea3d6b5e736d09

Activity 6_Question 1.2

0 stars0🌍 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.