Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6

Public visualization

Viewing a saved revision (read-only)

5afc266c2e464c1e9609e45ea7b5cf35

Activity6

0 stars0🌍 Public
DDeekshitha Annreddy
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Activity 7

This visualization shows the population of 30 countries in 2020 as horizontal bars, sorted by country name along the y-axis with population values extending along the x-axis. Each bar includes a native SVG tooltip displaying the formatted population value. The chart is built with React components that render SVG elements, using D3 v5’s `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. Population data is loaded as CSV from a GitHub repository and formatted with D3’s `format('.2s')` to abbreviate large numbers.

AI-generated description

A demonstration of how to start using D3 version 6.