Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6

Public visualization

Viewing a saved revision (read-only)

911c7ee03b7641629f74e4ca8b523498

Activity 6

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

This visualization displays the populations of 30 countries in 2020 as a horizontal bar chart, using SVG rectangles rendered through a React component. The chart imports data from a CSV file hosted on GitHub, processing population values by multiplying the 2020 column by 1000. It uses D3 v5’s `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, with automatic tick generation via `xScale.ticks()`. The `format` API converts large numbers into abbreviated labels, and tooltips show precise values using the `title` element.

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.