Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart Practice

Public visualization

Viewing a saved revision (read-only)

96e2316cb3554540933ab088707dcacf

Bar Chart Practice

0 stars1🌍 Public
Ttgrex6
Last edited Apr 16, 2022
Created on Apr 16, 2022
Forked from Hello VizHub

This example displays a horizontal bar chart of national populations using data from a CSV file, rendered as SVG rectangles. The code leverages D3 v5 APIs including `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to map population values to bar widths and country names to row positions. Population numbers are multiplied by 1000 to reflect actual figures. The chart is styled with steelblue bars and a left margin that accommodates country labels.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.