🌍 Public
Viewing a saved revision (read-only)
8799d05fe4a643e39e23987165e49fbd
Activity6_Question1.1
This example shows total population by country for the year 2000 as a horizontal bar chart, with country names along the vertical axis and population amounts along the horizontal axis. The bars are colored green, and hovering reveals a native tooltip with the formatted population value. Data comes from a CSV file loaded asynchronously via d3.csv, which then selects the top ten countries. The visualization uses React components to render SVG elements, with d3.scaleBand and d3.scaleLinear for the axes, and d3.format for abbreviating tick labels with "B" for billions.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.