Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6_Task 1.2

Public visualization

Viewing a saved revision (read-only)

33625b00da904411a0ce126dbe3bd1a1

activity 6_Task 1.2

0 stars0🌍 Public
MMallikarjun Narra
Last edited Apr 15, 2024
Created on Apr 15, 2024

This visualization displays the top 20 countries by 2010 population as a horizontal bar chart, using a React and D3 v5 setup with SVG rendering. The population data is loaded via `d3.csv` from a GitHub-hosted CSV file, and bars are sized using `scaleLinear` and positioned with `scaleBand`. Axis components are custom React functions rendering tick lines and labels, while a native SVG `<title>` element provides tooltips. Population values are formatted with `d3.format` to show abbreviated labels like “B” for billions. Axes and marks are styled with custom CSS classes.

AI-generated description

A demonstration of how to start using D3 version 6.