Skip to main content
100%

making a bar chart

✓ Published1🌍 Public
Jjingwg3@163.com
Last edited Sep 18, 2022
Created on Sep 18, 2022
Forked from D3 Starter

This example shows a horizontal bar chart ranking the populations of ten countries, from largest to smallest. The visualization uses a linear scale to map population values to bar widths and a band scale to position the categorical country labels, with axes rendered using d3.axisBottom and d3.axisLeft. The SVG is drawn using D3 v5, with data loaded from a CSV file via d3.csv and population values converted to numbers before rendering. Bars are appended as SVG rect elements with a steelblue fill.

AI-generated description
MIT Licensed

Similar vizzes