Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity6_task1_question1

Public visualization

Viewing a saved revision (read-only)

d02030f1b1004fa48b085c27d8bb4812

activity6_task1_question1

0 stars0🌍 Public
JJaswanthkota@my.unt.edu
Last edited Oct 22, 2024
Created on Oct 22, 2024

This example uses a horizontal bar chart to display the top 10 countries by population in the year 2000. The chart, built with React and rendered as SVG, uses D3 v5 utilities like `scaleBand` and `scaleLinear` to map country names and population values to screen coordinates. Each bar’s length corresponds to the population value, with a tooltip showing the formatted number. Data is loaded from a remote CSV file via D3’s `csv` function, and the x-axis labels are customized using D3’s `format` to abbreviate large numbers.

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.