Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Cchristoshanes
Last edited Mar 31, 2019
Created on Mar 31, 2019
Forked from Making a Bar Chart

This example demonstrates a basic bar chart that visualizes the populations of ten countries, from China to Mexico, using horizontal bars sorted by descending population size. The chart encodes population values as bar lengths along the x-axis, with country names positioned along the y-axis. Built with D3 v5, the code relies on `scaleLinear` for the numeric x-axis, `scaleBand` for the categorical y-axis, and the `csv` parser to load data from a local CSV file. The bars are rendered as SVG rectangles, with each rectangle’s width and height mapped from the parsed population data.

AI-generated description
MIT Licensed

Similar vizzes