Skip to main content
100%

Fork of Fork of Hello VizHub

✓ Published0🌍 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
MIT Licensed

Similar vizzes