Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 1_ Question 1

Public visualization

Activity 6_Task 1_ Question 1

0 stars0🌍 Public
Ccraftinghermit@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024

This example shows a horizontal bar chart of population figures for 30 countries in 2020, ranked with country names on the y-axis and population values on the x-axis. The visualization uses React components to render SVG elements, with D3 v5’s `scaleBand` and `scaleLinear` for positioning and the `format` function to abbreviate tick labels (e.g., “1.2B”). Data is loaded asynchronously from a CSV file using D3’s `csv` method, and each bar includes a tooltip via the SVG `<title>` element.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed