Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Activity 7

Public visualization

Viewing a saved revision (read-only)

96594647f64d4b1eb40e8e7fe7769a6b

Fork of Activity 7

0 stars0🌍 Public
SSwapna1915
Last edited Jul 5, 2023
Created on Jul 3, 2023
Forked from Activity 7

This example shows a horizontal bar chart comparing the 2020 estimated populations of 20 countries, with each bar’s length encoded by population value and labeled along the left axis. The visualization is built with React and D3 v5, using `scaleBand` for the categorical country axis, `scaleLinear` for the population scale, and `format('.2s')` to abbreviate tick labels (e.g., “B” for billions). Data is loaded as CSV via `csv()` from a remote GitHub URL, with numeric values multiplied by 1000, and rendered as SVG `<rect>` elements with tooltips.

AI-generated description

A demonstration of how to start using D3 version 6.