Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

93e08215382b43eb9680a05de1e7d07f

Making a bar chart

0 stars0🌍 Public
Kkiyimba5
Last edited Mar 5, 2021
Created on Mar 5, 2021

This example shows a horizontal bar chart of country populations, with each bar’s length proportional to the population value. The chart uses D3 v5’s `scaleLinear` for the x-axis and `scaleBand` for the y-axis, rendering SVG rectangles whose `width` and `y` attributes are set from the data. Population values from the CSV file are multiplied by 1000 to reflect actual counts, and the data is loaded asynchronously via `d3.csv`.

AI-generated description