Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of activity 6_ Q1.2

Public visualization

Viewing a saved revision (read-only)

548738622b0c4044a0d6dade126a8693

Fork of activity 6_ Q1.2

0 stars0🌍 Public
Hhkodiripaka15@gmail.com
Last edited Apr 6, 2024
Created on Apr 6, 2024

This example shows a horizontal bar chart comparing the 2010 populations of twenty countries, sorted alphabetically by country name. Population values are converted from raw CSV numbers and formatted as billions using D3's `format` function. The visualization uses React with D3 v5 scales (`scaleBand` for the y-axis and `scaleLinear` for the x-axis), rendering SVG rectangles for each bar. Hovering over a bar reveals a tooltip with the formatted population value. The chart includes styled axes with blue tick lines and a labeled x-axis, and loads data asynchronously from a GitHub-hosted CSV file.

AI-generated description

A demonstration of how to start using D3 version 6.