Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
LLonwabo11
Last edited May 6, 2019
Created on May 3, 2019
Forked from Making a bar chart

This example shows a horizontal bar chart of population data for ten countries, using a linear scale for population values and a band scale for country names. The bars are rendered as SVG rectangles with a blue fill, and the chart includes left and bottom axes for reference. The code loads data from a CSV file using `d3.csv`, converts the population column to numbers, and builds the visualization with `d3.scaleLinear`, `d3.scaleBand`, `d3.axisLeft`, and `d3.axisBottom`. The SVG canvas is 960 by 500 pixels, with margins applied to position the plot area.

AI-generated description
MIT Licensed

Similar vizzes