Skip to main content
100%

Bar Chart Practice

✓ Published1🌍 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.
MIT Licensed

Similar vizzes