Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_population

Public visualization

Viewing a saved revision (read-only)

465e8c73a5434daeb3555d884c4d5e37

Activity6_population

0 stars3🌍 Public
DDouglas mochama
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This example visualizes the top ten countries by population in 2000 as a horizontal bar chart. Using a d3.scaleLinear for the x-axis and d3.scaleBand for the y-axis, it renders SVG rectangles with steelblue fill. The code loads data from a CSV via d3.csv, sorts it descending, and formats axis tick labels in millions. Axes are created with d3.axisBottom and d3.axisLeft, with custom text labels for both dimensions.

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.