Skip to main content
100%

barGraph

✓ Published0🌍 Public
AAnissa Belkelfa
Last edited Sep 26, 2022
Created on Sep 26, 2022
Forked from barGraph

This bar graph displays the 2022 population for each country from a CSV dataset. When hovering over a bar, a tooltip reveals the country name and its population. The chart uses an SVG canvas and is built with D3.js v5, loading data via `csv()` and rendering axes and bars through `scaleBand`, `scaleLinear`, `axisBottom`, and `axisLeft`. The interface includes two buttons for sorting the bars in ascending or descending order, though the sorting logic is incomplete in the code.

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