Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity_8task1

Public visualization

activity_8task1

0 stars1🌍 Public
Ssaitejauppu0206@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024

This example shows a horizontal bar chart comparing the populations of ten countries for the year 2000, with country names on the y-axis and population totals on the x-axis. Built with React and D3 v5, it loads CSV data via `d3.csv`, scales values using `scaleBand` and `scaleLinear`, and renders bars as SVG rectangles. Axis components use `d3.format` to abbreviate tick labels, converting values like "1.2G" into "1.2B". The data comes from a GitHub-hosted CSV file, and tooltips appear via SVG `<title>` elements.

AI-generated description

A demonstration of how to start using D3 version 6.

Comments

Sign in to join the discussion.

MIT Licensed