Skip to main content
100%

Q1.2

✓ Published0🌍 Public
Ssindhuja27b@gmail.com
Last edited Mar 29, 2024
Created on Mar 29, 2024
Forked from Hello VizHub

This example visualizes the top 20 countries by population for 2020 using a horizontal bar chart rendered with SVG in React. The visualization employs D3 v5 scales, including `scaleBand` for the y-axis and `scaleLinear` for the x-axis, with country names on the vertical axis and population values on the horizontal axis. Data loads from a remote CSV file via `d3.csv` and displays tick marks with blue lines. Population values are formatted using D3's `format('.2s')` to abbreviate large numbers into billions, and each bar includes a native SVG tooltip showing its exact 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.
MIT Licensed

Similar vizzes