Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity8_Task-1

Public visualization

Viewing a saved revision (read-only)

0aa8dc868d7a40869e5b013203fc1da4

Activity8_Task-1

0 stars0🌍 Public
HHarika Metta
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This visualization displays the top 20 countries by population in 2010 as a horizontal bar chart, using an SVG rendering with React and D3 v5. The bars are color-coded green and include tooltips showing the population values. The x-axis is scaled using `d3.scaleLinear` with a custom SI format that converts values from billions to millions, while the y-axis uses `d3.scaleBand` for categorical country labels. The data is loaded from a CSV file using D3's `csv` method and processed with custom row parsing. The chart includes styled axes and labels, with the x-axis labeled "POPULATION-2010".

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.