Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Q1B

Public visualization

Viewing a saved revision (read-only)

84339988dcf4436084a109b191750f6b

Activity6_Q1B

0 stars0🌍 Public
DDee
Last edited Mar 31, 2025
Created on Mar 31, 2025
Forked from Activity6_Q1A

This example shows a horizontal bar chart ranking the top 20 countries by population in 2010, with country names on the y-axis and population values in millions on the x-axis. The chart loads data from a CSV file using `d3.csv` and renders bars as SVG `<rect>` elements sized by a `d3.scaleLinear` x-scale and positioned by a `d3.scaleBand` y-scale. Custom tick components generate labeled axes, and the React code manages state and effects to fetch and sort the data in descending order.

AI-generated description