Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 Question 1-2

Public visualization

Viewing a saved revision (read-only)

bec4144ab8a548e3912b9060098eca7d

Activity 6 Question 1-2

0 stars0🌍 Public
Nnikhilapogula@my.unt.edu
Last edited Apr 4, 2024
Created on Apr 3, 2024

This example displays a horizontal bar chart comparing the 2010 populations of twenty countries, sorted by the country name along the y-axis and population magnitude along the x-axis. Built with React and rendered as an SVG, the chart uses d3's `scaleBand` and `scaleLinear` to position bars and axes, with `d3.format` shortened to billion units for tick labels. Population data is loaded from a CSV file via d3's `csv` function, with each bar’s tooltip showing the formatted value.

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.