Skip to main content
100%

Fork of Activity_6_question-1.2

✓ Published0🌍 Public
AAbrarb702@gmail.com
Last edited Oct 24, 2024
Created on Oct 22, 2024

This example visualizes the 2020 populations of 20 countries as a horizontal bar chart, using SVG rectangles rendered through React components. It loads data from a GitHub-hosted CSV file via d3.csv, then maps each country’s population (converted from thousands) to bar widths using d3.scaleLinear, while d3.scaleBand positions the categorical y-axis labels. D3’s format method abbreviates large numbers, and custom AxisBottom and AxisLeft components generate styled ticks. The chart is built with React functional components and d3 v5, featuring green bars and blue tick lines.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes