Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity6_Task1

Public visualization

Viewing a saved revision (read-only)

1cf6eea037834f079e63f6afc497d769

activity6_Task1

0 stars0🌍 Public
Mmanasapolisetty13@gmail.com
Last edited Mar 30, 2025
Created on Mar 30, 2025

This example displays a horizontal bar chart of the top ten countries by population in 2020, using data from the provided CSV file. The bars are sorted in descending order and colored steelblue. The visualization is built with D3 v6, using `d3.scaleBand` for the categorical y-axis, `d3.scaleLinear` for the quantitative x-axis, and SVG rendering. Axis components are created with `d3.axisBottom` and `d3.axisLeft`, while population values are formatted with `d3.format`. The data is loaded asynchronously via `d3.csv`.

AI-generated description