Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
CCodeHandLuke
Last edited Aug 13, 2019
Created on Aug 13, 2019
Forked from Making a Bar Chart

This example shows a horizontal bar chart of the ten most populous countries in 2017, with population values (in thousands) drawn from a local CSV file. The chart renders as SVG using D3 v5, where the x-axis scale is linear and the y-axis uses a band scale with left-aligned axis labels. The code explicitly constructs the visualization with `select`, `csv`, `scaleLinear`, `scaleBand`, and `axisLeft` from the D3 library, then maps each country’s population to the rectangle’s width and country name to its vertical position.

AI-generated description
MIT Licensed

Similar vizzes