Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity question 1

Public visualization

Viewing a saved revision (read-only)

1207d7142dee413f899305e54c399d94

Activity question 1

0 stars0🌍 Public
AAamani Chamarthi
Last edited Oct 23, 2024
Created on Oct 23, 2024

This example renders a horizontal bar chart displaying the population figures for ten countries in the year 2000, with the largest populations extending furthest to the right. The visualization is built using React and the D3.js library, using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. Axes are constructed via the custom local `AxisBottom` and `AxisLeft` modules, while the bars are drawn as SVG rectangles with a hover tooltip showing the formatted value. Data is loaded asynchronously from a specified CSV file using D3's `csv` function.

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.