Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart

Public visualization

Bar Chart

0 stars0🌍 Public
WWilliam McGill
Last edited Oct 3, 2021
Created on Oct 3, 2021
Forked from HTML Starter

This bar chart visualizes population data from a CSV file, mapping each country’s population value to a rectangle. The code uses D3 v7’s `csv` loader, `scaleLinear`, and `max` functions to process the data, converting population values to numbers and multiplying by 1,000. It renders fixed-size 300x300 SVG rectangles, which do not yet encode the data proportionally—a partial implementation of the chart. The React-free example relies on selecting an SVG element and appending rects via `selectAll` and `enter`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed