Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Hello VizHub

Public visualization

Viewing a saved revision (read-only)

86f8a6b5b6b142a4bbffb90f6bc67267

Fork of Fork of Hello VizHub

0 stars0🌍 Public
Ssohith kampalli
Last edited Mar 30, 2025
Created on Mar 30, 2025

This example shows a horizontal bar chart ranking the populations of twenty countries in 2010, sorted in descending order with steelblue bars. It uses D3 v7’s `scaleLinear` for bar widths, `scaleBand` for categorical y-axis positioning, and `d3.axisLeft` and `d3.axisBottom` to render the axes. The data is loaded from a CSV file via `d3.csv`, then parsed, sorted, and sliced. The SVG is manually sized at 960 by 600 pixels, with margins controlled through a transform on a group element.

AI-generated description