Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Ookleinlux
Last edited May 4, 2020
Created on May 4, 2020

This example shows a horizontal bar chart comparing the populations of ten countries, with bars sized proportionally to each country’s population value. The visualization uses D3 v5’s `scaleLinear` for the x-axis, `scaleBand` for the y-axis categories, and renders bars as SVG `rect` elements. Data is loaded from a CSV file via `d3.csv` and parsed from strings to numbers. The chart emphasizes a clean, straightforward layout without axes or labels, focusing solely on the relative bar lengths.

AI-generated description
MIT Licensed

Similar vizzes