Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 1 (question 1)

Public visualization

Viewing a saved revision (read-only)

4c13d69f1a71421c890a7605ba027cc3

Activity 6_Task 1 (question 1)

0 stars1🌍 Public
SSowjanya Devupalli
Last edited Oct 20, 2024
Created on Oct 17, 2024
Forked from activity 6_Task 1

This example shows a horizontal bar chart ranking the populations of ten countries for the year 2000, with country names on the y-axis and population values on the x-axis. The visualization uses React to render SVG elements via D3’s `scaleBand` and `scaleLinear` for positioning, while `AxisBottom` and `AxisLeft` components generate tick marks and labels. Data is loaded as CSV from a GitHub repository, with population values converted from thousands. Tooltips display formatted population figures using D3’s `format(‘.2s’)`.

AI-generated description

A demonstration of how to start using D3 version 6.