Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

bar chart making

Public visualization

Viewing a saved revision (read-only)

7faf28a0629744a7954166825c371b40

bar chart making

0 stars0🌍 Public
SshaikhAhmed232
Last edited Oct 17, 2022
Created on Oct 17, 2022
Forked from Hello VizHub

This bar chart visualizes population data for ten countries loaded from a local CSV file, displaying each country’s population as a vertical rectangle. The chart uses D3 v5’s `scaleBand` for the categorical x-axis and `scaleLinear` for the numeric y-axis, with SVG rendering. Axes are not drawn, but the bar heights are set via the y-scale, and the data values are multiplied by 1,000. The example demonstrates ES6 module imports for D3 functions and local modules, with data loaded asynchronously via `csv()`.

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.