Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Making a bar chart

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed