Fork of barGraph
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed