🌍 Public
Viewing a saved revision (read-only)
8fc3cf383c8b424fb597a7c175cb1f7c
Simple Data Visualization
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.