Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

making a bar chart

Public visualization

making a bar chart

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed