Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Simple Data Visualization

Public visualization

Viewing a saved revision (read-only)

8fc3cf383c8b424fb597a7c175cb1f7c

Simple Data Visualization

0 stars0🌍 Public
AAbdul Kareem
Last edited Apr 26, 2024
Created on Apr 26, 2024
Forked from Hello VizHub

This example shows a bar chart of hospital beds per thousand people across countries, using a CSV dataset from a GitHub repository. The visualization renders in SVG with D3 v6, using `d3.scaleBand` for the x-axis and `d3.scaleLinear` with `d3.axisLeft` and `d3.axisBottom` for the axes. Interactive hover tooltips display the country name and bed count via mouse events and a `#tooltip` div. The chart includes styled bars that change color on hover, with rotated x-axis labels for readability.

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.