Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 1 (question 2)

Public visualization

Viewing a saved revision (read-only)

2709c173a90f42ddb0cb9469ce197817

Activity 6_Task 1 (question 2)

0 stars0🌍 Public
SSowjanya Devupalli
Last edited Oct 20, 2024
Created on Oct 17, 2024

This example shows a horizontal bar chart of population data for 20 countries in 2010. The chart maps country names to the y-axis and population to the x-axis, with light green bars and blue tick marks. It uses React components with D3 v5 scales (`scaleBand`, `scaleLinear`), `csv` for data loading from a GitHub-hosted CSV, and SVG rendering. The x-axis labels are formatted using D3’s `format` function with SI prefixes (e.g., “B” for billions), and tooltips display the formatted population via an SVG `<title>` element.

AI-generated description

A demonstration of how to start using D3 version 6.