Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task1_Qus2

Public visualization

Viewing a saved revision (read-only)

ced779f6428b45cb8a96dae1b0936966

Activity6_Task1_Qus2

0 stars0🌍 Public
Aamarnadhkari98@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024

This example shows a horizontal bar chart of population figures for 20 countries in 2010, drawn as SVG rectangles scaled by population value. The chart uses React with D3 v5, employing `scaleBand` for the categorical country axis, `scaleLinear` for the population axis, and custom `AxisBottom` and `AxisLeft` components to render ticks. Data is loaded asynchronously via `d3.csv` from a GitHub-hosted CSV file. Population values are formatted with D3’s `format` function, converting large numbers into abbreviated labels like “1.2B,” and hover tooltips display the same formatted values.

AI-generated description

A demonstration of how to start using D3 version 6.