Fork of Fork of Hello VizHub
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.