Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Lets make a bar chart

Public visualization

Viewing a saved revision (read-only)

0c633674251d4f249bd7616fdd2f750e

Lets make a bar chart

0 stars0🌍 Public
Eenzo-dante
Last edited Jul 9, 2019
Created on Jul 9, 2019
Forked from Bar Chart

This example displays a horizontal bar chart ranking the ten most populous countries, using a bar length to encode each country’s population. The visualization loads data from a CSV file and renders it as SVG rectangles. The code uses d3.csv, d3.scaleLinear, and d3.scaleBand from D3 v5 to map population values to pixel widths and country names to vertical positions. The population figures are multiplied by 1,000 during data preprocessing before the bars are drawn.

AI-generated description