Skip to main content
100%

making a bar chart

✓ Published0🌍 Public
MMichael Milano
Last edited Jan 1, 2020
Created on Jan 1, 2020

This example shows a horizontal bar chart comparing the populations of ten countries, with each bar’s length encoded by population and its vertical position by country name. It loads data from a CSV file using `d3.csv`, then renders the chart with D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` utilities. The bars are drawn as SVG rectangles inside a translated group, with axes appended via `g.call()`. The visualization highlights the stark population differences among the listed nations.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes