Skip to main content
100%

barGraph

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

This example shows a bar chart comparing the 2022 population of countries from a CSV dataset, with axis labels rotated and a tooltip displaying country and population on hover. The visualization loads D3 v5 via UNPKG and uses d3.csv, scaleBand, scaleLinear, axisLeft, and axisBottom to render SVG bars. Two buttons allow sorting the bars in ascending or descending population order by re-sorting the data array and re-rendering the chart.

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