Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6-Q1.1

Public visualization

Viewing a saved revision (read-only)

32bd580964dc4729ae4d39857f90fed9

activity 6-Q1.1

0 stars0🌍 Public
119n81a0581sunny@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This visualization is a horizontal bar chart showing the population of ten countries in the year 2000, ordered along a categorical y-axis and a linear x-axis. Built with React and D3 version 5, it uses `d3.scaleBand` for the categorical axis, `d3.scaleLinear` for the numerical axis, and SVG rectangles for the bars. The code employs `d3.csv` to load data from a GitHub-hosted CSV file, with tick labels formatted using `d3.format` (e.g., converting "2.5G" to "2.5B"). Axes are rendered by custom components `AxisBottom` and `AxisLeft`, and each bar includes a tooltip showing the population value.

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.