Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
Jjrdieter15
Last edited Jul 24, 2020
Created on Jul 24, 2020

This example shows a bar chart of country populations using a static CSV dataset loaded with `d3.csv`. The bars are drawn as SVG rectangles within a fixed 960×500 viewport, with population values converted from thousands to absolute numbers via a `+` unary operator. The chart relies on D3 v5’s `select` and `csv` functions to fetch and parse the data, while the rendering is handled entirely through SVG elements created without scales or axes, leaving the raw data values to determine bar heights.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes