Skip to main content
100%

Activity question 1

✓ Published0🌍 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.
MIT Licensed

Similar vizzes