Skip to main content
100%

D3 Making a Bar Chart

✓ Published1🌍 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
MIT Licensed

Similar vizzes