Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity-6 Task-1

Public visualization

Viewing a saved revision (read-only)

64d19ec2ccd64cafa05f4ae9b82c50b0

Activity-6 Task-1

0 stars2🌍 Public
Aarthireddykota@my.unt.edu
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart of 2020 population data for 30 countries, ranked from largest to smallest at the top. The SVG visualization uses React components to render the chart, with D3 v5’s `scaleBand` for the categorical y-axis and `scaleLinear` for the continuous x-axis. Bar lengths encode population values, and hovering over a bar reveals its formatted value via a tooltip. Axes are drawn with custom `AxisBottom` and `AxisLeft` components that generate tick marks and labels, while the data is fetched from a 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.