Skip to main content
100%

activity 6_Question 1.1

✓ Published1🌍 Public
AAnilreddyveeraiahgari@my.unt.edu
Last edited Apr 4, 2025
Created on Apr 4, 2025

This example shows a horizontal bar chart comparing the population of the top 10 countries in 2020. The bars are rendered as SVG rectangles using React, with the length of each bar encoding population magnitude. The code uses d3.scaleBand for the categorical y-axis, d3.scaleLinear for the quantitative x-axis, and d3.format to display tick labels in abbreviated form (e.g., "B" for billions). Data is loaded asynchronously from a CSV file using d3.csv, and tooltips appear via SVG `<title>` elements. The chart includes labeled axes for country names and population values.

AI-generated description
MIT Licensed

Similar vizzes