Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6_Task 1

Public visualization

Viewing a saved revision (read-only)

2b61076fd89c420a9be194d2dbd3d953

activity 6_Task 1

0 stars0🌍 Public
Ggketan456@gmail.com
Last edited Oct 20, 2024
Created on Oct 19, 2024
Forked from Hello VizHub

This visualization shows the 2020 population of 30 countries as a horizontal bar chart, with country names on the y-axis and population values on the x-axis. The bars are colored a light green, with blue axis ticks and a labeled x-axis in billions. The code uses React hooks—`useState`, `useCallback` and `useEffect`—to load CSV data via `d3.csv` from a GitHub repository, then renders the chart with `d3.scaleBand` and `d3.scaleLinear` as SVG elements, formatting tick labels using `d3.format`.

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.