Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 1

Public visualization

Viewing a saved revision (read-only)

2f75b214086e4341abed78f9b049ed78

Activity 6_Task 1

0 stars0🌍 Public
NNagalakshmi Thota
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This D3.js bar chart displays the population of 30 countries in 2020, using horizontal bars on a Cartesian grid. The visualization leverages React components and D3 version 5's `scaleBand` for the categorical y-axis and `scaleLinear` for the numerical x-axis. Data is loaded via a CSV URL providing population figures, which are formatted using D3's `format` function to display values in billions. The SVG rendering includes blue tick lines, green bars, and a labeled x-axis, with tooltips showing formatted population values on hover.

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.