Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tutorial 1 Question 1

Public visualization

Viewing a saved revision (read-only)

925bc1d9a66e497a8488c9bba5909a0c

Tutorial 1 Question 1

0 stars0🌍 Public
Cchandrikachowdary867@gmail.com
Last edited Apr 13, 2024
Created on Apr 13, 2024
Forked from Activity-6

This visualization presents a horizontal bar chart comparing the populations of ten countries in the year 2000. Built with React and D3 v5, it uses `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis, rendering bars as SVG `rect` elements with tooltips. The code creates axes using custom components that call `d3.axisBottom` and `d3.axisLeft`, while data is loaded from a GitHub-hosted CSV file via `d3.csv`. Population values are formatted using D3's `format` function, transforming labels like "G" to "B" for billions.

AI-generated description

A demonstration of how to start using D3 version 6.