Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of activity 6_Task 1_Question 2

Public visualization

Viewing a saved revision (read-only)

3453bed39e504d90aa04e1c41e7e0253

Fork of activity 6_Task 1_Question 2

0 stars0🌍 Public
VVijay Sheru
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from activity 6_Task 1

This example shows a horizontal bar chart of the top 20 countries by population in 2010, sorted in descending order. The visualization uses React to render SVG elements, with d3.scaleBand and d3.scaleLinear for positioning bars. The code imports d3.csv to load data from a GitHub-hosted CSV file, and d3.format to abbreviate axis tick labels (e.g., “B” for billions). Hovering over a bar reveals a tooltip via the native SVG <title> element, and the chart includes styled axes with blue tick lines and green bars.

AI-generated description