Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Viewing a saved revision (read-only)

32650c7d902149e191657885c4a9f296

Making a bar chart

0 stars1🌍 Public
NNkwachi Abel
Last edited Jun 12, 2022
Created on May 23, 2022

This example shows a horizontal bar chart of population counts for the top 10 most populous countries, using data from a CSV file. The bars are rendered as SVG rectangles, with a linear scale mapping population to bar width and a band scale for country labels. The code uses D3 v5 functions including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, with tick labels formatted via `format('.3s')`. A React starter template is referenced, though the visible implementation uses plain D3 with an SVG container.

AI-generated description

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

See also React Starter.