Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

c0adab85848e4bcdbc430cac5d801b14

D3 Making a Bar Chart

0 stars1🌍 Public
GGordon Yang
Last edited Feb 25, 2021
Created on Jan 11, 2021

This example shows a horizontal bar chart of country populations using data from a CSV file. The chart loads population figures for ten countries, scales them by 1,000, and renders them as steel-blue rectangles with an ordinal y-axis and linear x-axis. The code uses D3 v6 APIs including `d3.csv`, `d3.scaleLinear`, `d3.scaleBand`, `d3.axisLeft`, and `d3.axisBottom` to bind data and draw SVG elements.

AI-generated description