Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of barGraph

Public visualization

Fork of barGraph

0 stars0🌍 Public
Ffkara09
Last edited Sep 26, 2022
Created on Sep 26, 2022
Forked from barGraph

This bar chart displays the 2022 population for each country, sorted alphabetically on the x-axis with population values on the y-axis. It uses D3 v5 (d3.scaleBand, d3.scaleLinear, d3.axisLeft, d3.axisBottom) to render SVG rectangles, with a tooltip showing country name and population on hover. A button triggers `orderCountry()` to re-sort the bars in descending population order. Data comes from a local CSV file.

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.

Comments

Sign in to join the discussion.

MIT Licensed