Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question1

Public visualization

Viewing a saved revision (read-only)

cd5d354579024298bcfc5bc02dfc4aa3

Question1

0 stars0🌍 Public
Eeedaraajay02@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the populations of the top 10 countries in the year 2000, with numeric labels formatted using shorthand notation (e.g., "1.2B"). It is built with React and D3 v5, using `scaleBand` and `scaleLinear` to map country names and population values to SVG rectangles. Data is loaded asynchronously from a CSV file via D3’s `csv` function, filtered to the first ten rows, and rendered with custom `AxisBottom`, `AxisLeft`, and `Marks` components. The chart also includes interactive tooltips using SVG `<title>` elements.

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.