Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
Ggavriel-binshtok
Last edited Dec 8, 2019
Created on Nov 25, 2019
Forked from data

This example shows a horizontal bar chart ranking the populations of ten countries, scaled by thousands. The visualization uses D3 v5 with SVG rendering, reading data from a CSV file and mapping population values to bar widths via `d3.scaleLinear` and country names to `d3.scaleBand`. The code demonstrates data loading with `d3.csv`, appending rectangles to the SVG, and applying margins to position the chart. No axes or labels are drawn, focusing purely on the bar geometry.

AI-generated description
MIT Licensed

Similar vizzes