Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Create a Bar Chart

Public visualization

Viewing a saved revision (read-only)

3a8789832b504cc7a0817dd6527f4f13

Create a Bar Chart

0 stars1🌍 Public
Aarg04
Last edited Jul 5, 2020
Created on Jul 4, 2020

This example shows a horizontal bar chart ranking nine countries by population, using a bar’s length to encode each value. The chart is rendered as SVG via D3 v5, with `d3.csv` loading the data and `scaleLinear` and `scaleBand` mapping population and country names to pixel positions. Bars are appended as `rect` elements, and each population value is multiplied by 1000 to reflect actual figures. The code imports only the needed D3 functions, keeping the bundle minimal.

AI-generated description